My Project
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules
soc_gethostid.c
Go to the documentation of this file.
1 #include "soc_common.h"
2 
3 long gethostid(void)
4 {
5  int ret=0;
6  u32 *cmdbuf = getThreadCommandBuffer();
7 
8  cmdbuf[0] = 0x00160000;
9 
10  if((ret = svcSendSyncRequest(SOCU_handle))!=0)return ret;
11 
12  ret = (int)cmdbuf[1];
13  if(ret==0)ret = cmdbuf[2];
14 
15  return ret;
16 }
long gethostid(void)
Definition: soc_gethostid.c:3
u32 * getThreadCommandBuffer(void)
uint32_t u32
Definition: types.h:23
s32 svcSendSyncRequest(Handle session)
Handle SOCU_handle
Definition: soc_common.c:4