os/ossrv/genericopenlibs/openenvcore/include/sys/ipc.dosc
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericopenlibs/openenvcore/include/sys/ipc.dosc	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,155 @@
     1.4 +/** @file  ../include/sys/ipc.h
     1.5 +@internalComponent
     1.6 +*/
     1.7 +
     1.8 +/** @fn  ftok(const char *pathname, int proj_id)
     1.9 +@param pathname
    1.10 +@param proj_id
    1.11 +@return   The ftok function will return -1 if pathname does not exist or if it cannot be accessed by the calling process.
    1.12 +On  success  the  generated key_t value is returned.
    1.13 +
    1.14 +  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.
    1.15 +
    1.16 + The specified pathname must specify an existing file that is accessible to the calling process
    1.17 +or the call will fail.
    1.18 +Also, note that links to files will return the
    1.19 +same key, given the same id.
    1.20 +
    1.21 +Examples:
    1.22 +@code
    1.23 +#include <sys/types.h>
    1.24 +#include <sys/ipc.h>
    1.25 +#include <stdio.h>
    1.26 +
    1.27 +int main(void)
    1.28 +{
    1.29 +    char *pathame = "C:\XXX";
    1.30 +    int proj_id = 100;
    1.31 +    key_t fkey;
    1.32 +    if ((fkey = ftok(pathame, proj_id)) == -1) {
    1.33 +        printf("ftok() failed
    1.34 +");
    1.35 +    }
    1.36 +    return 0;
    1.37 +}
    1.38 +
    1.39 +@endcode
    1.40 +@see semget()
    1.41 +@see shmget()
    1.42 +@see msgget()
    1.43 +
    1.44 +
    1.45 +
    1.46 +@capability Deferred @ref RFs::Entry(const TDesC16&, TEntry&)
    1.47 +
    1.48 +@publishedAll
    1.49 +@externallyDefinedApi
    1.50 +*/
    1.51 +
    1.52 +
    1.53 +/** @struct ipc_perm
    1.54 +
    1.55 +To store information needed in determining  permissions  to  perform  an  ipc  operation.
    1.56 +
    1.57 +@publishedAll
    1.58 +@externallyDefinedApi
    1.59 +*/
    1.60 +
    1.61 +/** @var ipc_perm::cuid
    1.62 +creator user id
    1.63 +*/
    1.64 +
    1.65 +/** @var ipc_perm::cgid
    1.66 +creator group id 
    1.67 +*/
    1.68 +
    1.69 +/** @var ipc_perm::uid
    1.70 +user id
    1.71 +*/
    1.72 +
    1.73 +/** @var ipc_perm::gid
    1.74 +group id 
    1.75 +*/
    1.76 +
    1.77 +/** @var ipc_perm::mode
    1.78 +rw permission
    1.79 +*/
    1.80 +
    1.81 +/** @var ipc_perm::seq
    1.82 +sequence X (to generate unique ipcid)
    1.83 +*/
    1.84 +
    1.85 +/** @var ipc_perm::key
    1.86 +user specified msg or sem or shm key
    1.87 +*/
    1.88 +
    1.89 +
    1.90 +/** @def IPC_CREAT
    1.91 +
    1.92 +SVID required constants (same values as system 5). create entry if key does not exist.
    1.93 +
    1.94 +@publishedAll
    1.95 +@externallyDefinedApi
    1.96 +*/
    1.97 +
    1.98 +/** @def IPC_EXCL
    1.99 +
   1.100 +SVID required constants (same values as system 5). fail if key exists.
   1.101 +
   1.102 +@publishedAll
   1.103 +@externallyDefinedApi
   1.104 +*/
   1.105 +
   1.106 +/** @def IPC_NOWAIT
   1.107 +
   1.108 +SVID required constants (same values as system 5). error if request must wait.
   1.109 +
   1.110 +@publishedAll
   1.111 +@externallyDefinedApi
   1.112 +*/
   1.113 +
   1.114 +/** @def IPC_PRIVATE	
   1.115 +
   1.116 +private key 
   1.117 +
   1.118 +@publishedAll
   1.119 +@externallyDefinedApi
   1.120 +*/
   1.121 +
   1.122 +/** @def IPC_RMID
   1.123 +
   1.124 +remove identifier
   1.125 +
   1.126 +@publishedAll
   1.127 +@externallyDefinedApi
   1.128 +*/
   1.129 +
   1.130 +/** @def IPC_SET
   1.131 +
   1.132 +set options
   1.133 +
   1.134 +@publishedAll
   1.135 +@externallyDefinedApi
   1.136 +*/
   1.137 +
   1.138 +
   1.139 +/** @def IPC_STAT
   1.140 +
   1.141 +get options
   1.142 +
   1.143 +@publishedAll
   1.144 +@externallyDefinedApi
   1.145 +*/
   1.146 +
   1.147 +
   1.148 +
   1.149 +
   1.150 +
   1.151 +
   1.152 +
   1.153 +
   1.154 +
   1.155 +
   1.156 +
   1.157 +
   1.158 +