version 1.6.4.1, 2013/01/17 13:10:49
|
version 1.6.4.2, 2013/01/17 13:26:37
|
Line 109 inline void sess_SetErr(int eno, char *estr, ...);
|
Line 109 inline void sess_SetErr(int eno, char *estr, ...);
|
|
|
|
|
/* |
/* |
* sess_initSession() Initializing session structure, | * sess_initSession() - Initializing session structure, |
* if session file not exists creating with specified tech |
* if session file not exists creating with specified tech |
* |
* |
* @id = Technology using in session. SHARED_IPC IPC tech or SHARED_MAP BSD MemoryMap tech |
* @id = Technology using in session. SHARED_IPC IPC tech or SHARED_MAP BSD MemoryMap tech |
Line 119 inline void sess_SetErr(int eno, char *estr, ...);
|
Line 119 inline void sess_SetErr(int eno, char *estr, ...);
|
*/ |
*/ |
int sess_initSession(int id, const char *csFName, ait_sess_t ** __restrict Sess); |
int sess_initSession(int id, const char *csFName, ait_sess_t ** __restrict Sess); |
/* |
/* |
* sess_freeSession() Free allocated memory for session item and delete session file if present name | * sess_freeSession() - Free allocated memory for session item and delete session file if present name |
* |
* |
* @Sess = Session item |
* @Sess = Session item |
* return: none |
* return: none |
Line 127 int sess_initSession(int id, const char *csFName, ait_
|
Line 127 int sess_initSession(int id, const char *csFName, ait_
|
void sess_freeSession(ait_sess_t ** __restrict Sess); |
void sess_freeSession(ait_sess_t ** __restrict Sess); |
|
|
/* |
/* |
* map_createSession() MMAP Created session and allocated resources | * map_createSession() - MMAP Created session and allocated resources |
* |
* |
* @nSeed = Seed for securing key, if =-1 must add ready for use key |
* @nSeed = Seed for securing key, if =-1 must add ready for use key |
* @nSize = Allocated shared memory size in bytes |
* @nSize = Allocated shared memory size in bytes |
Line 137 void sess_freeSession(ait_sess_t ** __restrict Sess);
|
Line 137 void sess_freeSession(ait_sess_t ** __restrict Sess);
|
*/ |
*/ |
int map_createSession(int nSeed, long nSize, ait_sess_t * __restrict Sess, ...); |
int map_createSession(int nSeed, long nSize, ait_sess_t * __restrict Sess, ...); |
/* |
/* |
* map_destroySession() MMAP free shared resources | * map_destroySession() - MMAP free shared resources |
* |
* |
* @Sess = Session item |
* @Sess = Session item |
* return: none |
* return: none |
Line 145 int map_createSession(int nSeed, long nSize, ait_sess_
|
Line 145 int map_createSession(int nSeed, long nSize, ait_sess_
|
void map_destroySession(ait_sess_t * __restrict Sess); |
void map_destroySession(ait_sess_t * __restrict Sess); |
|
|
/* |
/* |
* ipc_createSession() IPC Created session and allocated resources | * ipc_createSession() - IPC Created session and allocated resources |
* |
* |
* @nSeed = Seed for securing key, if =-1 must add ready for use key |
* @nSeed = Seed for securing key, if =-1 must add ready for use key |
* @nSize = Allocated shared memory size in bytes |
* @nSize = Allocated shared memory size in bytes |
Line 155 void map_destroySession(ait_sess_t * __restrict Sess);
|
Line 155 void map_destroySession(ait_sess_t * __restrict Sess);
|
*/ |
*/ |
int ipc_createSession(int nSeed, long nSize, ait_sess_t * __restrict Sess, ...); |
int ipc_createSession(int nSeed, long nSize, ait_sess_t * __restrict Sess, ...); |
/* |
/* |
* ipc_destroySession() IPC free shared resources | * ipc_destroySession() - IPC free shared resources |
* |
* |
* @Sess = Session item |
* @Sess = Session item |
* return: none |
* return: none |
Line 163 int ipc_createSession(int nSeed, long nSize, ait_sess_
|
Line 163 int ipc_createSession(int nSeed, long nSize, ait_sess_
|
void ipc_destroySession(ait_sess_t * __restrict Sess); |
void ipc_destroySession(ait_sess_t * __restrict Sess); |
|
|
/* |
/* |
* map_attachSession() MMAP Attach to shared memory & return begin address | * map_attachSession() - MMAP Attach to shared memory & return begin address |
* |
* |
* @s = Session item |
* @s = Session item |
* @procMem = Custom start address (optionl) *default must be 0* |
* @procMem = Custom start address (optionl) *default must be 0* |
Line 171 void ipc_destroySession(ait_sess_t * __restrict Sess);
|
Line 171 void ipc_destroySession(ait_sess_t * __restrict Sess);
|
*/ |
*/ |
void *map_attachSession(ait_sess_t * __restrict s, void *procMem); |
void *map_attachSession(ait_sess_t * __restrict s, void *procMem); |
/* |
/* |
* map_detachSession() MMAP Detach from shared memory | * map_detachSession() - MMAP Detach from shared memory |
* |
* |
* @s = Session item |
* @s = Session item |
* return: none |
* return: none |
Line 179 void *map_attachSession(ait_sess_t * __restrict s, voi
|
Line 179 void *map_attachSession(ait_sess_t * __restrict s, voi
|
void map_detachSession(ait_sess_t * __restrict s); |
void map_detachSession(ait_sess_t * __restrict s); |
|
|
/* |
/* |
* ipc_attachSession() IPC Attach to shared memory & return begin address | * ipc_attachSession() - IPC Attach to shared memory & return begin address |
* |
* |
* @s = Session item |
* @s = Session item |
* @procMem = Custom start address (optionl) *default must be 0* |
* @procMem = Custom start address (optionl) *default must be 0* |
Line 187 void map_detachSession(ait_sess_t * __restrict s);
|
Line 187 void map_detachSession(ait_sess_t * __restrict s);
|
*/ |
*/ |
void *ipc_attachSession(ait_sess_t * __restrict s, void *procMem); |
void *ipc_attachSession(ait_sess_t * __restrict s, void *procMem); |
/* |
/* |
* ipc_detachSession() IPC Detach from shared memory | * ipc_detachSession() - IPC Detach from shared memory |
* |
* |
* @s = Session item |
* @s = Session item |
* return: none |
* return: none |
Line 195 void *ipc_attachSession(ait_sess_t * __restrict s, voi
|
Line 195 void *ipc_attachSession(ait_sess_t * __restrict s, voi
|
void ipc_detachSession(ait_sess_t * __restrict s); |
void ipc_detachSession(ait_sess_t * __restrict s); |
|
|
/* |
/* |
* sess_isAttached() Check for attached shared memory | * sess_isAttached() - Check for attached shared memory |
* |
* |
* @s = Session item |
* @s = Session item |
* return: -1 null session item, 0 not attached, 1 attached memory |
* return: -1 null session item, 0 not attached, 1 attached memory |
Line 204 inline int sess_isAttached(ait_sess_t * __restrict s);
|
Line 204 inline int sess_isAttached(ait_sess_t * __restrict s);
|
|
|
|
|
/* |
/* |
* map_notSemaphore() MMAP negative block if semaphore isn`t signaled | * map_notSemaphore() - MMAP negative block if semaphore isn`t signaled |
* |
* |
* @s = Session item |
* @s = Session item |
* return: none |
* return: none |
*/ |
*/ |
void map_notSemaphore(ait_sess_t * __restrict s); |
void map_notSemaphore(ait_sess_t * __restrict s); |
/* |
/* |
* map_isSemaphoreOK() MMAP Check semaphore | * map_isSemaphoreOK() - MMAP Check semaphore |
* |
* |
* @s = Session item |
* @s = Session item |
* return: -1 error: can`t return semaphore, 0 = false, 1 = true |
* return: -1 error: can`t return semaphore, 0 = false, 1 = true |
*/ |
*/ |
int map_isSemaphoreOK(ait_sess_t * __restrict s); |
int map_isSemaphoreOK(ait_sess_t * __restrict s); |
/* |
/* |
* map_incSemaphore() MMAP unblock semaphore, increment semaphore | * map_incSemaphore() - MMAP unblock semaphore, increment semaphore |
* |
* |
* @s = Session item |
* @s = Session item |
* return: 0 Ok, -1 error: can`t increment |
* return: 0 Ok, -1 error: can`t increment |
*/ |
*/ |
int map_incSemaphore(ait_sess_t * __restrict s); |
int map_incSemaphore(ait_sess_t * __restrict s); |
/* |
/* |
* map_decSemaphore() MMAP block semaphore, decrement semaphore | * map_decSemaphore() - MMAP block semaphore, decrement semaphore |
* |
* |
* @s = Session item |
* @s = Session item |
* return: 0 Ok, -1 error: can`t decrement |
* return: 0 Ok, -1 error: can`t decrement |
Line 233 int map_incSemaphore(ait_sess_t * __restrict s);
|
Line 233 int map_incSemaphore(ait_sess_t * __restrict s);
|
int map_decSemaphore(ait_sess_t * __restrict s); |
int map_decSemaphore(ait_sess_t * __restrict s); |
|
|
/* |
/* |
* ipc_notSemaphore() IPC negative block if semaphore isn`t signaled | * ipc_notSemaphore() - IPC negative block if semaphore isn`t signaled |
* |
* |
* @s = Session item |
* @s = Session item |
* return: none |
* return: none |
*/ |
*/ |
void ipc_notSemaphore(ait_sess_t * __restrict s); |
void ipc_notSemaphore(ait_sess_t * __restrict s); |
/* |
/* |
* ipc_isSemaphoreOK() IPC Check semaphore | * ipc_isSemaphoreOK() - IPC Check semaphore |
* |
* |
* @s = Session item |
* @s = Session item |
* return: -1 error: can`t return semaphore, 0 = false, 1 = true |
* return: -1 error: can`t return semaphore, 0 = false, 1 = true |
*/ |
*/ |
int ipc_isSemaphoreOK(ait_sess_t * __restrict s); |
int ipc_isSemaphoreOK(ait_sess_t * __restrict s); |
/* |
/* |
* ipc_incSemaphore() IPC unblock semaphore, increment semaphore | * ipc_incSemaphore() - IPC unblock semaphore, increment semaphore |
* |
* |
* @s = Session item |
* @s = Session item |
* return: 0 Ok, -1 error: can`t increment |
* return: 0 Ok, -1 error: can`t increment |
*/ |
*/ |
int ipc_incSemaphore(ait_sess_t * __restrict s); |
int ipc_incSemaphore(ait_sess_t * __restrict s); |
/* |
/* |
* ipc_decSemaphore() IPC block semaphore, decrement semaphore | * ipc_decSemaphore() - IPC block semaphore, decrement semaphore |
* |
* |
* @s = Session item |
* @s = Session item |
* return: 0 Ok, -1 error: can`t decrement |
* return: 0 Ok, -1 error: can`t decrement |
Line 278 int ipc_decSemaphore(ait_sess_t * __restrict s);
|
Line 278 int ipc_decSemaphore(ait_sess_t * __restrict s);
|
/* --------------------------------------------------------- */ |
/* --------------------------------------------------------- */ |
|
|
/* |
/* |
* sess_FreeValues() Free all values from value array allocated from sess_GetValues() | * sess_FreeValues() - Free all values from value array allocated from sess_GetValues() |
* |
* |
* @ppsVals = Array strings |
* @ppsVals = Array strings |
* return: none |
* return: none |
*/ |
*/ |
inline void sess_FreeValues(char *** __restrict ppsVals); |
inline void sess_FreeValues(char *** __restrict ppsVals); |
/* |
/* |
* sess_GetValues() Get all values from session shared memory | * sess_GetValues() - Get all values from session shared memory |
* |
* |
* @s = Session item |
* @s = Session item |
* @ppsVals = Return array strings |
* @ppsVals = Return array strings |
* return: -1 error: in parameter, !=-1 count of returned strings in ppsVals (must be free after use!) | * return: -1 error: in parameter, !=-1 count of returned strings in ppsVals |
| * (must be sess_FreeValues after use!) |
*/ |
*/ |
int sess_GetValues(ait_sess_t * __restrict s, char ***ppsVals); |
int sess_GetValues(ait_sess_t * __restrict s, char ***ppsVals); |
/* |
/* |
* sess_GetValue() Get value from session shared memory from attribute | * sess_GetValue() - Get value from session shared memory from attribute |
* |
* |
* @s = Session item |
* @s = Session item |
* @csAttr = Attribute for search |
* @csAttr = Attribute for search |
* @psVal = Return string buffer |
* @psVal = Return string buffer |
* @pnLen = Length of return string buffer, |
* @pnLen = Length of return string buffer, |
// *{pnLen} input is max_size of buffer & output is really taken bytes |
// *{pnLen} input is max_size of buffer & output is really taken bytes |
* return: 0 not found, -1 error: in parameter, >0 get position, if define item merged with IS_DEF | * return: 0 not found, -1 error: in parameter, >0 get position, |
| * if define item merged with IS_DEF |
*/ |
*/ |
int sess_GetValue(ait_sess_t * __restrict s, const char *csAttr, char *psVal, int *pnLen); |
int sess_GetValue(ait_sess_t * __restrict s, const char *csAttr, char *psVal, int *pnLen); |
/* |
/* |
* sess_DelValue() Delete item from session shared memory | * sess_DelValue() - Delete item from session shared memory |
* |
* |
* @s = Session item |
* @s = Session item |
* @csAttr = Attribute for erasing |
* @csAttr = Attribute for erasing |
Line 312 int sess_GetValue(ait_sess_t * __restrict s, const cha
|
Line 314 int sess_GetValue(ait_sess_t * __restrict s, const cha
|
*/ |
*/ |
int sess_DelValue(ait_sess_t * __restrict s, const char *csAttr); |
int sess_DelValue(ait_sess_t * __restrict s, const char *csAttr); |
/* |
/* |
* sess_SetValue() Set item into session shared memory or update if find it | * sess_SetValue() - Set item into session shared memory or update if exists |
* |
* |
* @s = Session item |
* @s = Session item |
* @csAttr = Attribute |
* @csAttr = Attribute |
Line 323 int sess_DelValue(ait_sess_t * __restrict s, const cha
|
Line 325 int sess_DelValue(ait_sess_t * __restrict s, const cha
|
int sess_SetValue(ait_sess_t * __restrict s, const char *csAttr, const char *psVal); |
int sess_SetValue(ait_sess_t * __restrict s, const char *csAttr, const char *psVal); |
|
|
/* |
/* |
* sess_prepareSession() Attach to shared memory and de-marshaling data | * sess_prepareSession() - Attach to shared memory and de-marshaling data |
* |
* |
* @s = Session |
* @s = Session |
* @useDirect = Use direct shared memory if !=0 or snapshot of data to array |
* @useDirect = Use direct shared memory if !=0 or snapshot of data to array |
Line 332 int sess_SetValue(ait_sess_t * __restrict s, const cha
|
Line 334 int sess_SetValue(ait_sess_t * __restrict s, const cha
|
*/ |
*/ |
array_t *sess_prepareSession(ait_sess_t * __restrict s, char useDirect); |
array_t *sess_prepareSession(ait_sess_t * __restrict s, char useDirect); |
/* |
/* |
* sess_doneSession() Free resources allocated with sess_prepareSession() | * sess_doneSession() - Free resources allocated with sess_prepareSession() |
* |
* |
* @s = Session |
* @s = Session |
* @arr = Array with variables for free |
* @arr = Array with variables for free |
Line 340 array_t *sess_prepareSession(ait_sess_t * __restrict s
|
Line 342 array_t *sess_prepareSession(ait_sess_t * __restrict s
|
*/ |
*/ |
void sess_doneSession(ait_sess_t * __restrict s, array_t ** __restrict arr); |
void sess_doneSession(ait_sess_t * __restrict s, array_t ** __restrict arr); |
/* |
/* |
* sess_commitSession() Commit data to shared memory | * sess_commitSession() - Commit data to shared memory |
* |
* |
* @s = Session |
* @s = Session |
* @arr = Array with variables for save |
* @arr = Array with variables for save |