add inline functions: get_shm_key_for_system, get_sem_key_for_system, and get_sem_key_for_layers

This commit is contained in:
Vincent Wei
2020-01-21 17:34:44 +08:00
parent d595ffe76f
commit 528ed6589d

View File

@@ -74,6 +74,21 @@ enum {
_NR_SYS_SEM,
};
inline static key_t get_shm_key_for_system (void)
{
return (key_t)(IPC_KEY_BASE + 0x01);
}
inline static key_t get_sem_key_for_system (void)
{
return (key_t)(IPC_KEY_BASE + 0x02);
}
inline static key_t get_sem_key_for_layers (void)
{
return (key_t)(IPC_KEY_BASE + 0x03);
}
typedef struct tagG_RES {
int semid;
int shmid;