sl@0: /** @file ../include/sys/ipc.h sl@0: @internalComponent sl@0: */ sl@0: sl@0: /** @fn ftok(const char *pathname, int proj_id) sl@0: @param pathname sl@0: @param proj_id sl@0: @return The ftok function will return -1 if pathname does not exist or if it cannot be accessed by the calling process. sl@0: On success the generated key_t value is returned. sl@0: sl@0: The ftok function attempts to create a unique key suitable for use with the msgget , semget and shmget functions given the pathname of an existing file and a user-selectable id. sl@0: sl@0: The specified pathname must specify an existing file that is accessible to the calling process sl@0: or the call will fail. sl@0: Also, note that links to files will return the sl@0: same key, given the same id. sl@0: sl@0: Examples: sl@0: @code sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: int main(void) sl@0: { sl@0: char *pathame = "C:\XXX"; sl@0: int proj_id = 100; sl@0: key_t fkey; sl@0: if ((fkey = ftok(pathame, proj_id)) == -1) { sl@0: printf("ftok() failed sl@0: "); sl@0: } sl@0: return 0; sl@0: } sl@0: sl@0: @endcode sl@0: @see semget() sl@0: @see shmget() sl@0: @see msgget() sl@0: sl@0: sl@0: sl@0: @capability Deferred @ref RFs::Entry(const TDesC16&, TEntry&) sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: sl@0: /** @struct ipc_perm sl@0: sl@0: To store information needed in determining permissions to perform an ipc operation. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @var ipc_perm::cuid sl@0: creator user id sl@0: */ sl@0: sl@0: /** @var ipc_perm::cgid sl@0: creator group id sl@0: */ sl@0: sl@0: /** @var ipc_perm::uid sl@0: user id sl@0: */ sl@0: sl@0: /** @var ipc_perm::gid sl@0: group id sl@0: */ sl@0: sl@0: /** @var ipc_perm::mode sl@0: rw permission sl@0: */ sl@0: sl@0: /** @var ipc_perm::seq sl@0: sequence X (to generate unique ipcid) sl@0: */ sl@0: sl@0: /** @var ipc_perm::key sl@0: user specified msg or sem or shm key sl@0: */ sl@0: sl@0: sl@0: /** @def IPC_CREAT sl@0: sl@0: SVID required constants (same values as system 5). create entry if key does not exist. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def IPC_EXCL sl@0: sl@0: SVID required constants (same values as system 5). fail if key exists. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def IPC_NOWAIT sl@0: sl@0: SVID required constants (same values as system 5). error if request must wait. sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def IPC_PRIVATE sl@0: sl@0: private key sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def IPC_RMID sl@0: sl@0: remove identifier sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: /** @def IPC_SET sl@0: sl@0: set options sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: sl@0: /** @def IPC_STAT sl@0: sl@0: get options sl@0: sl@0: @publishedAll sl@0: @externallyDefinedApi sl@0: */ sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: