Changeset 809:e77aaa92c2f9
- Timestamp:
- 05/15/08 05:42:43 (4 years ago)
- Branch:
- libdodo
- Tags:
- libdodo-0.9.0
- Location:
- trunk
- Files:
-
- 24 edited
-
include/libdodo/baseEx.h (modified) (4 diffs)
-
include/libdodo/cgiFastExchangeEx.h (modified) (2 diffs)
-
include/libdodo/cgiFastServerEx.h (modified) (2 diffs)
-
include/libdodo/cgiPreprocessorEx.h (modified) (2 diffs)
-
include/libdodo/cgiProcessorEx.h (modified) (2 diffs)
-
include/libdodo/ipcProcessCollection.h (modified) (8 diffs)
-
include/libdodo/ipcProcessSharedDataCollectionGuard.h (modified) (1 diff)
-
include/libdodo/ipcSharedDataCollectionGuard.h (modified) (1 diff)
-
include/libdodo/ipcThreadCollection.h (modified) (8 diffs)
-
include/libdodo/ipcThreadSharedDataCollectionGuard.h (modified) (1 diff)
-
include/libdodo/toolsNetwork.h (modified) (5 diffs)
-
include/libdodo/toolsOs.h (modified) (3 diffs)
-
include/libdodo/xexec.h (modified) (9 diffs)
-
src/baseEx.cc (modified) (14 diffs)
-
src/cgiFastServer.cc (modified) (3 diffs)
-
src/ipcProcessCollection.cc (modified) (12 diffs)
-
src/ipcProcessSharedDataCollectionGuard.cc (modified) (3 diffs)
-
src/ipcThreadCollection.cc (modified) (12 diffs)
-
src/ipcThreadSharedDataCollectionGuard.cc (modified) (3 diffs)
-
src/toolsNetwork.cc (modified) (6 diffs)
-
src/toolsOs.cc (modified) (7 diffs)
-
src/xexec.cc (modified) (11 diffs)
-
tests/iostd_test/test.cc (modified) (2 diffs)
-
tests/toolsmisc_test/module.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/libdodo/baseEx.h
r803 r809 116 116 117 117 /** 118 * @struct __ exMod is returned from initExModule in the library119 */ 120 struct __ exMod118 * @struct __baseExMod is returned from initBaseExModule in the library 119 */ 120 struct __baseExMod 121 121 { 122 122 char name[64]; ///< name of the library … … 127 127 128 128 /** 129 * @typedef init ExModule defines type of init function for library130 */ 131 typedef __ exMod (*initExModule)(void *);132 133 /** 134 * @typedef deinit ExModule defines type of deinit function for library135 */ 136 typedef void (*deinit ExModule)();129 * @typedef initBaseExModule defines type of init function for library 130 */ 131 typedef __baseExMod (*initBaseExModule)(void *); 132 133 /** 134 * @typedef deinitBaseExModule defines type of deinit function for library 135 */ 136 typedef void (*deinitBaseExModule)(); 137 137 138 138 #endif … … 220 220 * @param toInit defines data that will be passed to the init function 221 221 */ 222 static __ exMod getModuleInfo(const dodoString &path, void *toInit = NULL);222 static __baseExMod getModuleInfo(const dodoString &path, void *toInit = NULL); 223 223 224 224 /** … … 228 228 * @param data decribes data that will be passed to the handler 229 229 * @param toInit defines data that will be passed to the init function 230 * @note module for what to set handler is taken from the library information[see __ exMod]230 * @note module for what to set handler is taken from the library information[see __baseExMod] 231 231 */ 232 232 static bool setErrorHandler(const dodoString &path, void *data, void *toInit = NULL); -
trunk/include/libdodo/cgiFastExchangeEx.h
r807 r809 38 38 * libdodo defined errors 39 39 */ 40 enum fastExchangeExR40 enum exchangeExR 41 41 { 42 42 FASTEXCHANGEEX_FAILEDTOFLUSH, … … 53 53 * IDs of functions where exception might be thrown 54 54 */ 55 enum fastExchangeFunctionsID55 enum exchangeFunctionsID 56 56 { 57 57 FASTEXCHANGEEX_FLUSH, -
trunk/include/libdodo/cgiFastServerEx.h
r807 r809 38 38 * libdodo defined errors 39 39 */ 40 enum fastExR40 enum serverExR 41 41 { 42 FASTSERVEREX_ACCEPTFAILED,43 FASTSERVEREX_ISCGI,42 SERVEREX_ACCEPTFAILED, 43 SERVEREX_ISCGI, 44 44 }; 45 45 … … 53 53 * IDs of functions where exception might be thrown 54 54 */ 55 enum fastFunctionsID55 enum serverFunctionsID 56 56 { 57 FASTSERVEREX_LISTEN,58 FASTSERVEREX_STACKTHREAD,57 SERVEREX_LISTEN, 58 SERVEREX_STACKTHREAD, 59 59 }; 60 60 } -
trunk/include/libdodo/cgiPreprocessorEx.h
r807 r809 36 36 * libdodo defined errors 37 37 */ 38 enum cgiPreprocessorExR38 enum preprocessorExR 39 39 { 40 40 PREPROCESSOREX_NOTCLOSEDBRACKET, … … 49 49 * IDs of functions where exception might be thrown 50 50 */ 51 enum cgiPreprocessorFunctionsID51 enum preprocessorFunctionsID 52 52 { 53 53 PREPROCESSOREX__PREPROCESSSTRING, -
trunk/include/libdodo/cgiProcessorEx.h
r807 r809 36 36 * libdodo defined errors 37 37 */ 38 enum cgiProcessorExR38 enum processorExR 39 39 { 40 40 PROCESSOREX_WRONGIFSTATEMENT, … … 59 59 * IDs of functions where exception might be thrown 60 60 */ 61 enum cgiProcessorFunctionsID61 enum processorFunctionsID 62 62 { 63 63 PROCESSOREX__IF, -
trunk/include/libdodo/ipcProcessCollection.h
r805 r809 52 52 enum collectionOnDestructEnum 53 53 { 54 COLLECTION_ KEEP_ALIVE,55 COLLECTION_ STOP, ///< send SIGINT to process56 COLLECTION_ WAIT54 COLLECTION_ONDESTRUCT_KEEP_ALIVE, 55 COLLECTION_ONDESTRUCT_STOP, ///< send SIGINT to process 56 COLLECTION_ONDESTRUCT_WAIT 57 57 }; 58 58 … … 84 84 85 85 /** 86 * @struct __ collectionMod defines data that is returned from initSystemProcessCollectionModule in the library87 */ 88 struct __ collectionMod86 * @struct __processMod defines data that is returned from initIpcProcessCollectionModule in the library 87 */ 88 struct __processMod 89 89 { 90 90 char name[64]; ///< name of module … … 96 96 97 97 /** 98 * @typedef init SystemProcessCollectionModule defines type of init function for library99 */ 100 typedef __ collectionMod (*initSystemProcessCollectionModule)(void *);101 102 /** 103 * @typedef deinit SystemProcessCollectionModule defines type of deinit function for library104 */ 105 typedef void (*deinit SystemProcessCollectionModule)();98 * @typedef initIpcProcessCollectionModule defines type of init function for library 99 */ 100 typedef __processMod (*initIpcProcessCollectionModule)(void *); 101 102 /** 103 * @typedef deinitIpcProcessCollectionModule defines type of deinit function for library 104 */ 105 typedef void (*deinitIpcProcessCollectionModule)(); 106 106 107 107 #endif … … 152 152 * this will immediately execute the process 153 153 */ 154 virtual unsigned long addNRun(job::routine func, void *data, unsigned long limit = 1, short action = COLLECTION_ WAIT);154 virtual unsigned long addNRun(job::routine func, void *data, unsigned long limit = 1, short action = COLLECTION_ONDESTRUCT_WAIT); 155 155 156 156 /** … … 160 160 * @param data defines process data 161 161 * @note func must not call `exit` family call 162 * action = COLLECTION_ WAIT162 * action = COLLECTION_ONDESTRUCT_WAIT 163 163 */ 164 164 virtual unsigned long add(job::routine func, void *data); … … 171 171 * @note func must not call `exit` family call 172 172 * this will immediately execute the process 173 * action = COLLECTION_ WAIT173 * action = COLLECTION_ONDESTRUCT_WAIT 174 174 */ 175 175 virtual unsigned long addNRun(job::routine func, void *data); … … 190 190 * @param action defines action on object destruction if process is running[see collectionOnDestructEnum] 191 191 */ 192 virtual void replace(unsigned long position, job::routine func, void *data, bool force = false, short action = COLLECTION_ WAIT);192 virtual void replace(unsigned long position, job::routine func, void *data, bool force = false, short action = COLLECTION_ONDESTRUCT_WAIT); 193 193 194 194 /** … … 266 266 * @param toInit defines library init data 267 267 */ 268 static __ collectionMod getModuleInfo(const dodoString &module, void *toInit = NULL);268 static __processMod getModuleInfo(const dodoString &module, void *toInit = NULL); 269 269 270 270 #endif -
trunk/include/libdodo/ipcProcessSharedDataCollectionGuard.h
r805 r809 108 108 virtual bool getShare(unsigned long position); 109 109 110 dodoList<ipc::shared::__ shareInfo> shares; ///< identificators of shared data110 dodoList<ipc::shared::__info> shares; ///< identificators of shared data 111 111 112 112 unsigned long shareNum; ///< number of registered shares 113 113 114 dodoList<ipc::shared::__ shareInfo>::iterator current; ///< iterator for list of shared data[for matched with getShare method]114 dodoList<ipc::shared::__info>::iterator current; ///< iterator for list of shared data[for matched with getShare method] 115 115 }; 116 116 }; -
trunk/include/libdodo/ipcSharedDataCollectionGuard.h
r805 r809 37 37 { 38 38 /** 39 * @struct __ shareInfo defines shared data39 * @struct __info defines shared data 40 40 */ 41 struct __ shareInfo41 struct __info 42 42 { 43 43 unsigned long position; ///< shared data identificator -
trunk/include/libdodo/ipcThreadCollection.h
r805 r809 57 57 enum collectionOnDestructEnum 58 58 { 59 COLLECTION_ KEEP_ALIVE,60 COLLECTION_ STOP,61 COLLECTION_ WAIT59 COLLECTION_ONDESTRUCT_KEEP_ALIVE, 60 COLLECTION_ONDESTRUCT_STOP, 61 COLLECTION_ONDESTRUCT_WAIT 62 62 }; 63 63 … … 96 96 97 97 /** 98 * @struct __ collectionMod defines data that is returned from initSystemThreadCollectionModule in the library99 */ 100 struct __ collectionMod98 * @struct __threadMod defines data that is returned from initIpcThreadCollectionModule in the library 99 */ 100 struct __threadMod 101 101 { 102 102 char name[64]; ///< name of module … … 110 110 111 111 /** 112 * @typedef init SystemThreadCollectionModule defines type of init function for library113 */ 114 typedef __ collectionMod (*initSystemThreadCollectionModule)(void *);115 116 /** 117 * @typedef deinit SystemThreadCollectionModule defines type of deinit function for library118 */ 119 typedef void (*deinit SystemThreadCollectionModule)();112 * @typedef initIpcThreadCollectionModule defines type of init function for library 113 */ 114 typedef __threadMod (*initIpcThreadCollectionModule)(void *); 115 116 /** 117 * @typedef deinitIpcThreadCollectionModule defines type of deinit function for library 118 */ 119 typedef void (*deinitIpcThreadCollectionModule)(); 120 120 121 121 #endif … … 168 168 * @note this will immediately execute the process 169 169 */ 170 virtual unsigned long addNRun(job::routine func, void *data, unsigned long limit = 1, bool detached = false, short action = COLLECTION_ WAIT, int stackSize = 2097152);170 virtual unsigned long addNRun(job::routine func, void *data, unsigned long limit = 1, bool detached = false, short action = COLLECTION_ONDESTRUCT_WAIT, int stackSize = 2097152); 171 171 172 172 /** … … 177 177 * @note 178 178 * detached=false 179 * action=COLLECTION_ WAIT179 * action=COLLECTION_ONDESTRUCT_WAIT 180 180 * stackSize=2097152 181 181 */ … … 190 190 * limit=1 191 191 * detached=false 192 * action=COLLECTION_ WAIT192 * action=COLLECTION_ONDESTRUCT_WAIT 193 193 * stackSize=2097152 194 194 */ … … 212 212 * @param stackSize defines stack thread size 213 213 */ 214 virtual void replace(unsigned long position, job::routine func, void *data, bool force = false, bool detached = false, short action = COLLECTION_ WAIT, int stackSize = 2097152);214 virtual void replace(unsigned long position, job::routine func, void *data, bool force = false, bool detached = false, short action = COLLECTION_ONDESTRUCT_WAIT, int stackSize = 2097152); 215 215 216 216 /** … … 288 288 * @param toInit defines library init data 289 289 */ 290 static __ collectionMod getModuleInfo(const dodoString &module, void *toInit = NULL);290 static __threadMod getModuleInfo(const dodoString &module, void *toInit = NULL); 291 291 292 292 #endif -
trunk/include/libdodo/ipcThreadSharedDataCollectionGuard.h
r805 r809 108 108 virtual bool getShare(unsigned long position); 109 109 110 dodoList<ipc::shared::__ shareInfo> shares; ///< identificators of shared data110 dodoList<ipc::shared::__info> shares; ///< identificators of shared data 111 111 112 112 unsigned long shareNum; ///< number of registered shares 113 113 114 dodoList<ipc::shared::__ shareInfo>::iterator current; ///< iterator for list of shared data[for matched with getShare method]114 dodoList<ipc::shared::__info>::iterator current; ///< iterator for list of shared data[for matched with getShare method] 115 115 }; 116 116 }; -
trunk/include/libdodo/toolsNetwork.h
r799 r809 46 46 { 47 47 /** 48 * @struct __i fInfo defines interface information48 * @struct __interfaceInfo defines interface information 49 49 */ 50 struct __i fInfo50 struct __interfaceInfo 51 51 { 52 52 dodoString address; ///< ip address of the interface … … 70 70 71 71 /** 72 * @struct __serv Info defines info about service72 * @struct __serviceInfo defines info about service 73 73 */ 74 struct __serv Info74 struct __serviceInfo 75 75 { 76 76 dodoString name; ///< original name of the service … … 96 96 * @param interface defines a name of the interface 97 97 */ 98 static __i fInfo getInterfaceInfo(const dodoString &interface);98 static __interfaceInfo getInterfaceInfo(const dodoString &interface); 99 99 100 100 /** … … 126 126 * @param protocol defines protocol of the service(tcp, udp ..) 127 127 */ 128 static __serv Info getServiceInfo(const dodoString &service, const dodoString &protocol);128 static __serviceInfo getServiceInfo(const dodoString &service, const dodoString &protocol); 129 129 130 130 /** … … 133 133 * @param protocol defines protocol of the service(tcp, udp ..) 134 134 */ 135 static __serv Info getServiceInfo(int port, const dodoString &protocol);135 static __serviceInfo getServiceInfo(int port, const dodoString &protocol); 136 136 137 137 }; -
trunk/include/libdodo/toolsOs.h
r800 r809 166 166 167 167 /** 168 * @struct __sig Mod is returned from initSigModule in the library169 */ 170 struct __sig Mod168 * @struct __signalMod is returned from initOsSignalModule in the library 169 */ 170 struct __signalMod 171 171 { 172 172 char name[64]; ///< name of the library … … 178 178 179 179 /** 180 * @typedef init SigModule defines type of init function for library181 */ 182 typedef __sig Mod (*initSigModule)(void *);183 184 /** 185 * @typedef deinit SigModule defines type of deinit function for library186 */ 187 typedef void (*deinit SigModule)();180 * @typedef initOsSignalModule defines type of init function for library 181 */ 182 typedef __signalMod (*initOsSignalModule)(void *); 183 184 /** 185 * @typedef deinitOsSignalModule defines type of deinit function for library 186 */ 187 typedef void (*deinitOsSignalModule)(); 188 188 189 189 #endif … … 414 414 * @param toInit defines data that will be passed to the init function 415 415 */ 416 static __sig Mod getModuleInfo(const dodoString &path, void *toInit = NULL);416 static __signalMod getModuleInfo(const dodoString &path, void *toInit = NULL); 417 417 418 418 /** -
trunk/include/libdodo/xexec.h
r801 r809 65 65 66 66 /** 67 * @struct __ execItem defines xexec node68 */ 69 struct __ execItem67 * @struct __xexecItem defines xexec node 68 */ 69 struct __xexecItem 70 70 { 71 71 inExec func; ///< function to execute … … 82 82 83 83 /** 84 * @struct __ execItemList defines collection of hooks85 */ 86 struct __ execItemList87 { 88 dodoList<__ execItem> exec; ///< hooks84 * @struct __xexecItemList defines collection of hooks 85 */ 86 struct __xexecItemList 87 { 88 dodoList<__xexecItem> exec; ///< hooks 89 89 bool execDisabled; ///< if true hooks are disabled 90 90 }; … … 368 368 * @param position defines XExec identificator 369 369 */ 370 virtual bool getXexec(dodoList<__ execItem> &list, int position);370 virtual bool getXexec(dodoList<__xexecItem> &list, int position); 371 371 372 372 /** … … 379 379 * @param data defines hook data 380 380 */ 381 virtual int addXExec(dodoList<__ execItem> &list, inExec func, void *obj, short type, void *data);381 virtual int addXExec(dodoList<__xexecItem> &list, inExec func, void *obj, short type, void *data); 382 382 383 383 /** … … 386 386 * @param position defines XExec identificator 387 387 */ 388 virtual void delXExec(dodoList<__ execItem> &list, int position);388 virtual void delXExec(dodoList<__xexecItem> &list, int position); 389 389 390 390 /** … … 395 395 * @param data defines hook data 396 396 */ 397 virtual void replaceXExec(dodoList<__ execItem> &list, int position, inExec func, void *data);397 virtual void replaceXExec(dodoList<__xexecItem> &list, int position, inExec func, void *data); 398 398 399 399 /** … … 403 403 * @param stat defines hook enabled state 404 404 */ 405 virtual void setStatXExec(dodoList<__ execItem> &list, int position, bool stat);405 virtual void setStatXExec(dodoList<__xexecItem> &list, int position, bool stat); 406 406 407 407 #ifdef DL_EXT … … 417 417 * @param toInit defines data that will be passed to the init function 418 418 */ 419 virtual int addXExecModule(dodoList<__ execItem> &list, const dodoString &path, void *obj, short type, void *data, void *toInit = NULL);419 virtual int addXExecModule(dodoList<__xexecItem> &list, const dodoString &path, void *obj, short type, void *data, void *toInit = NULL); 420 420 421 421 #endif … … 425 425 * @param list defines list of hooks 426 426 */ 427 virtual void performXExec(__ execItemList &list) const;428 429 mutable __ execItemList preExec; ///< preExec hooks430 mutable __ execItemList postExec; ///< postExec hooks427 virtual void performXExec(__xexecItemList &list) const; 428 429 mutable __xexecItemList preExec; ///< preExec hooks 430 mutable __xexecItemList postExec; ///< postExec hooks 431 431 432 432 int execs; ///< hook counter 433 433 434 dodoList<__ execItem>::iterator current; ///< iterator for list[for matched with getXexec method]434 dodoList<__xexecItem>::iterator current; ///< iterator for list[for matched with getXexec method] 435 435 436 436 mutable bool collectData; ///< if true to collect data for xexec[true by default] -
trunk/src/baseEx.cc
r797 r809 358 358 #ifdef DL_EXT 359 359 360 deinit ExModule deinit;360 deinitBaseExModule deinit; 361 361 362 362 for (int i(0); i < BASEEX_MODULES; ++i) … … 365 365 continue; 366 366 367 deinit = (deinit ExModule)dlsym(handlesEx[i], "deinitExModule");367 deinit = (deinitBaseExModule)dlsym(handlesEx[i], "deinitBaseExModule"); 368 368 if (deinit != NULL) 369 369 deinit(); … … 402 402 if (handlesOpenedEx[module]) 403 403 { 404 deinit ExModule deinit;405 406 deinit = (deinit ExModule)dlsym(handlesEx[module], "deinitExModule");404 deinitBaseExModule deinit; 405 406 deinit = (deinitBaseExModule)dlsym(handlesEx[module], "deinitBaseExModule"); 407 407 if (deinit != NULL) 408 408 deinit(); … … 432 432 433 433 #ifdef DL_EXT 434 deinit ExModule deinit;434 deinitBaseExModule deinit; 435 435 #endif 436 436 … … 441 441 if (handlesOpenedEx[i]) 442 442 { 443 deinit = (deinit ExModule)dlsym(handlesEx[i], "deinitExModule");443 deinit = (deinitBaseExModule)dlsym(handlesEx[i], "deinitBaseExModule"); 444 444 if (deinit != NULL) 445 445 deinit(); … … 472 472 if (handlesOpenedEx[module]) 473 473 { 474 deinit ExModule deinit;475 476 deinit = (deinit ExModule)dlsym(handlesEx[module], "deinitExModule");474 deinitBaseExModule deinit; 475 476 deinit = (deinitBaseExModule)dlsym(handlesEx[module], "deinitBaseExModule"); 477 477 if (deinit != NULL) 478 478 deinit(); … … 501 501 502 502 #ifdef DL_EXT 503 deinit ExModule deinit;503 deinitBaseExModule deinit; 504 504 #endif 505 505 … … 510 510 if (handlesOpenedEx[i]) 511 511 { 512 deinit = (deinit ExModule)dlsym(handlesEx[i], "deinitExModule");512 deinit = (deinitBaseExModule)dlsym(handlesEx[i], "deinitBaseExModule"); 513 513 if (deinit != NULL) 514 514 deinit(); … … 541 541 raceHazardGuard tg; 542 542 543 init ExModule init;543 initBaseExModule init; 544 544 errorHandler in; 545 deinit ExModule deinit;545 deinitBaseExModule deinit; 546 546 547 547 for (int i(0); i < BASEEX_MODULES; ++i) … … 550 550 if (handlesOpenedEx[i]) 551 551 { 552 deinit = (deinit ExModule)dlsym(handlesEx[i], "deinitExModule");552 deinit = (deinitBaseExModule)dlsym(handlesEx[i], "deinitBaseExModule"); 553 553 if (deinit != NULL) 554 554 deinit(); … … 570 570 return false; 571 571 572 init = (init ExModule)dlsym(handlesEx[i], "initExModule");572 init = (initBaseExModule)dlsym(handlesEx[i], "initBaseExModule"); 573 573 if (init == NULL) 574 574 return false; … … 606 606 return false; 607 607 608 init ExModule init = (initExModule)dlsym(handler, "initExModule");608 initBaseExModule init = (initBaseExModule)dlsym(handler, "initBaseExModule"); 609 609 if (init == NULL) 610 610 return false; 611 611 612 __ exMod mod = init(toInit);613 614 deinit ExModule deinit;612 __baseExMod mod = init(toInit); 613 614 deinitBaseExModule deinit; 615 615 616 616 if (handlesOpenedEx[mod.module]) 617 617 { 618 deinit = (deinit ExModule)dlsym(handlesEx[mod.module], "deinitExModule");618 deinit = (deinitBaseExModule)dlsym(handlesEx[mod.module], "deinitBaseExModule"); 619 619 if (deinit != NULL) 620 620 deinit(); … … 645 645 //------------------------------------------------------------------- 646 646 647 __ exMod647 __baseExMod 648 648 baseEx::getModuleInfo(const dodoString &module, 649 649 void *toInit) … … 657 657 #endif 658 658 if (handle == NULL) 659 return __ exMod();660 661 init ExModule init = (initExModule)dlsym(handle, "initExModule");659 return __baseExMod(); 660 661 initBaseExModule init = (initBaseExModule)dlsym(handle, "initBaseExModule"); 662 662 if (init == NULL) 663 return __ exMod();664 665 __ exMod mod = init(toInit);663 return __baseExMod(); 664 665 __baseExMod mod = init(toInit); 666 666 667 667 #ifndef DL_FAST -
trunk/src/cgiFastServer.cc
r807 r809 117 117 118 118 if (res == -1) 119 throw baseEx(ERRMODULE_CGIFASTSERVER, FASTSERVEREX_STACKTHREAD, ERR_LIBDODO, FASTSERVEREX_ACCEPTFAILED, CGIFASTSERVEREX_ACCEPTFAILED_STR, __LINE__, __FILE__);119 throw baseEx(ERRMODULE_CGIFASTSERVER, SERVEREX_STACKTHREAD, ERR_LIBDODO, SERVEREX_ACCEPTFAILED, CGIFASTSERVEREX_ACCEPTFAILED_STR, __LINE__, __FILE__); 120 120 121 121 handler(&cfSTD); … … 135 135 { 136 136 if (!isFastCgi()) 137 throw baseEx(ERRMODULE_CGIFASTSERVER, FASTSERVEREX_LISTEN, ERR_LIBDODO, FASTSERVEREX_ISCGI, CGIFASTSERVEREX_ISCGI_STR, __LINE__, __FILE__);137 throw baseEx(ERRMODULE_CGIFASTSERVER, SERVEREX_LISTEN, ERR_LIBDODO, SERVEREX_ISCGI, CGIFASTSERVEREX_ISCGI_STR, __LINE__, __FILE__); 138 138 139 139 #ifdef PTHREAD_EXT … … 163 163 { 164 164 if (FCGX_Accept_r(&request) == -1) 165 throw baseEx(ERRMODULE_CGIFASTSERVER, FASTSERVEREX_LISTEN, ERR_LIBDODO, FASTSERVEREX_ACCEPTFAILED, CGIFASTSERVEREX_ACCEPTFAILED_STR, __LINE__, __FILE__);165 throw baseEx(ERRMODULE_CGIFASTSERVER, SERVEREX_LISTEN, ERR_LIBDODO, SERVEREX_ACCEPTFAILED, CGIFASTSERVEREX_ACCEPTFAILED_STR, __LINE__, __FILE__); 166 166 167 167 handler(&cfSTD); -
trunk/src/ipcProcessCollection.cc
r807 r809 52 52 53 53 #ifdef DL_EXT 54 deinit SystemProcessCollectionModule deinit;54 deinitIpcProcessCollectionModule deinit; 55 55 #endif 56 56 … … 62 62 switch (i->action) 63 63 { 64 case COLLECTION_ KEEP_ALIVE:64 case COLLECTION_ONDESTRUCT_KEEP_ALIVE: 65 65 66 66 waitpid(i->pid, NULL, WNOHANG); … … 68 68 break; 69 69 70 case COLLECTION_ STOP:70 case COLLECTION_ONDESTRUCT_STOP: 71 71 72 72 kill(i->pid, 2); … … 74 74 break; 75 75 76 case COLLECTION_ WAIT:76 case COLLECTION_ONDESTRUCT_WAIT: 77 77 default: 78 78 … … 84 84 if (i->handle != NULL) 85 85 { 86 deinit = (deinit SystemProcessCollectionModule)dlsym(i->handle, "deinitSystemProcessCollectionModule");86 deinit = (deinitIpcProcessCollectionModule)dlsym(i->handle, "deinitIpcProcessCollectionModule"); 87 87 if (deinit != NULL) 88 88 deinit(); … … 128 128 void *data) 129 129 { 130 return add(func, data, COLLECTION_ WAIT);130 return add(func, data, COLLECTION_ONDESTRUCT_WAIT); 131 131 } 132 132 … … 137 137 void *data) 138 138 { 139 return addNRun(func, data, 1, COLLECTION_ WAIT);139 return addNRun(func, data, 1, COLLECTION_ONDESTRUCT_WAIT); 140 140 } 141 141 … … 207 207 if (current->handle != NULL) 208 208 { 209 deinit SystemProcessCollectionModule deinit;210 211 deinit = (deinit SystemProcessCollectionModule)dlsym(current->handle, "deinitSystemProcessCollectionModule");209 deinitIpcProcessCollectionModule deinit; 210 211 deinit = (deinitIpcProcessCollectionModule)dlsym(current->handle, "deinitIpcProcessCollectionModule"); 212 212 if (deinit != NULL) 213 213 deinit(); … … 294 294 if (current->handle != NULL) 295 295 { 296 deinit SystemProcessCollectionModule deinit;297 298 deinit = (deinit SystemProcessCollectionModule)dlsym(current->handle, "deinitSystemProcessCollectionModule");296 deinitIpcProcessCollectionModule deinit; 297 298 deinit = (deinitIpcProcessCollectionModule)dlsym(current->handle, "deinitIpcProcessCollectionModule"); 299 299 if (deinit != NULL) 300 300 deinit(); … … 501 501 #ifdef DL_EXT 502 502 503 __ collectionMod503 __processMod 504 504 collection::getModuleInfo(const dodoString &module, 505 505 void *toInit) … … 513 513 throw baseEx(ERRMODULE_IPCPROCESSCOLLECTION, COLLECTIONEX_GETMODULEINFO, ERR_DYNLOAD, 0, dlerror(), __LINE__, __FILE__); 514 514 515 init SystemProcessCollectionModule init = (initSystemProcessCollectionModule)dlsym(handle, "initSystemProcessCollectionModule");515 initIpcProcessCollectionModule init = (initIpcProcessCollectionModule)dlsym(handle, "initIpcProcessCollectionModule"); 516 516 if (init == NULL) 517 517 throw baseEx(ERRMODULE_IPCPROCESSCOLLECTION, COLLECTIONEX_GETMODULEINFO, ERR_DYNLOAD, 0, dlerror(), __LINE__, __FILE__); 518 518 519 __ collectionMod mod = init(toInit);519 __processMod mod = init(toInit); 520 520 521 521 #ifndef DL_FAST … … 547 547 throw baseEx(ERRMODULE_IPCPROCESSCOLLECTION, COLLECTIONEX_ADD, ERR_DYNLOAD, 0, dlerror(), __LINE__, __FILE__); 548 548 549 init SystemProcessCollectionModule init = (initSystemProcessCollectionModule)dlsym(process.handle, "initSystemProcessCollectionModule");549 initIpcProcessCollectionModule init = (initIpcProcessCollectionModule)dlsym(process.handle, "initIpcProcessCollectionModule"); 550 550 if (init == NULL) 551 551 throw baseEx(ERRMODULE_IPCPROCESSCOLLECTION, COLLECTIONEX_ADD, ERR_DYNLOAD, 0, dlerror(), __LINE__, __FILE__); 552 552 553 __ collectionMod temp = init(toInit);553 __processMod temp = init(toInit); 554 554 555 555 job::routine in = (job::routine)dlsym(process.handle, temp.hook); -
trunk/src/ipcProcessSharedDataCollectionGuard.cc
r807 r809 50 50 raceHazardGuard tg(this); 51 51 52 ipc::shared::__ shareInfo share;52 ipc::shared::__info share; 53 53 54 54 share.position = ++shareNum; … … 105 105 dataCollectionGuard::getShare(unsigned long position) 106 106 { 107 dodoList<ipc::shared::__ shareInfo>::const_iterator i(shares.begin()), j(shares.end());107 dodoList<ipc::shared::__info>::const_iterator i(shares.begin()), j(shares.end()); 108 108 for (; i != j; ++i) 109 109 if (i->position == position) 110 110 { 111 current = *((dodoList<ipc::shared::__ shareInfo>::iterator *) & i);111 current = *((dodoList<ipc::shared::__info>::iterator *) & i); 112 112 113 113 return true; … … 124 124 dodoList<unsigned long> ids; 125 125 126 dodoList<ipc::shared::__ shareInfo>::const_iterator i(shares.begin()), j(shares.end());126 dodoList<ipc::shared::__info>::const_iterator i(shares.begin()), j(shares.end()); 127 127 for (; i != j; ++i) 128 128 ids.push_back(i->position); -
trunk/src/ipcThreadCollection.cc
r807 r809 71 71 72 72 #ifdef DL_EXT 73 deinit SystemThreadCollectionModule deinit;73 deinitIpcThreadCollectionModule deinit; 74 74 #endif 75 75 … … 81 81 switch (i->action) 82 82 { 83 case COLLECTION_ KEEP_ALIVE:83 case COLLECTION_ONDESTRUCT_KEEP_ALIVE: 84 84 85 85 #ifdef PTHREAD_EXT … … 91 91 break; 92 92 93 case COLLECTION_ STOP:93 case COLLECTION_ONDESTRUCT_STOP: 94 94 95 95 #ifdef PTHREAD_EXT … … 101 101 break; 102 102 103 case COLLECTION_ WAIT:103 case COLLECTION_ONDESTRUCT_WAIT: 104 104 default: 105 105 … … 117 117 if (i->handle != NULL) 118 118 { 119 deinit = (deinit SystemThreadCollectionModule)dlsym(i->handle, "deinitSystemThreadCollectionModule");119 deinit = (deinitIpcThreadCollectionModule)dlsym(i->handle, "deinitIpcThreadCollectionModule"); 120 120 if (deinit != NULL) 121 121 deinit(); … … 136 136 void *data) 137 137 { 138 return add(func, data, false, COLLECTION_ WAIT, 2097152);138 return add(func, data, false, COLLECTION_ONDESTRUCT_WAIT, 2097152); 139 139 } 140 140 … … 211 211 if (current->handle != NULL) 212 212 { 213 deinit SystemThreadCollectionModule deinit;214 215 deinit = (deinit SystemThreadCollectionModule)dlsym(current->handle, "deinitSystemThreadCollectionModule");213 deinitIpcThreadCollectionModule deinit; 214 215 deinit = (deinitIpcThreadCollectionModule)dlsym(current->handle, "deinitIpcThreadCollectionModule"); 216 216 if (deinit != NULL) 217 217 deinit(); … … 265 265 if (current->handle != NULL) 266 266 { 267 deinit SystemThreadCollectionModule deinit;268 269 deinit = (deinit SystemThreadCollectionModule)dlsym(current->handle, "deinitSystemThreadCollectionModule");267 deinitIpcThreadCollectionModule deinit; 268 269 deinit = (deinitIpcThreadCollectionModule)dlsym(current->handle, "deinitIpcThreadCollectionModule"); 270 270 if (deinit != NULL) 271 271 deinit(); … … 528 528 #ifdef DL_EXT 529 529 530 __ collectionMod530 __threadMod 531 531 collection::getModuleInfo(const dodoString &module, 532 532 void *toInit) … … 540 540 throw baseEx(ERRMODULE_IPCTHREADCOLLECTION, COLLECTIONEX_GETMODULEINFO, ERR_DYNLOAD, 0, dlerror(), __LINE__, __FILE__); 541 541 542 init SystemThreadCollectionModule init = (initSystemThreadCollectionModule)dlsym(handle, "initSystemThreadCollectionModule");542 initIpcThreadCollectionModule init = (initIpcThreadCollectionModule)dlsym(handle, "initIpcThreadCollectionModule"); 543 543 if (init == NULL) 544 544 throw baseEx(ERRMODULE_IPCTHREADCOLLECTION, COLLECTIONEX_GETMODULEINFO, ERR_DYNLOAD, 0, dlerror(), __LINE__, __FILE__); 545 545 546 __ collectionMod mod = init(toInit);546 __threadMod mod = init(toInit); 547 547 548 548 #ifndef DL_FAST … … 574 574 throw baseEx(ERRMODULE_IPCTHREADCOLLECTION, COLLECTIONEX_ADD, ERR_DYNLOAD, 0, dlerror(), __LINE__, __FILE__); 575 575 576 init SystemThreadCollectionModule init = (initSystemThreadCollectionModule)dlsym(thread.handle, "initSystemThreadCollectionModule");576 initIpcThreadCollectionModule init = (initIpcThreadCollectionModule)dlsym(thread.handle, "initIpcThreadCollectionModule"); 577 577 if (init == NULL) 578 578 throw baseEx(ERRMODULE_IPCTHREADCOLLECTION, COLLECTIONEX_ADD, ERR_DYNLOAD, 0, dlerror(), __LINE__, __FILE__); 579 579 580 __ collectionMod temp = init(toInit);580 __threadMod temp = init(toInit); 581 581 582 582 job::routine in = (job::routine)dlsym(thread.handle, temp.hook); … … 624 624 void *data) 625 625 { 626 return addNRun(func, data, 1, false, COLLECTION_ WAIT, 2097152);626 return addNRun(func, data, 1, false, COLLECTION_ONDESTRUCT_WAIT, 2097152); 627 627 } 628 628 -
trunk/src/ipcThreadSharedDataCollectionGuard.cc
r807 r809 50 50 raceHazardGuard tg(this); 51 51 52 ipc::shared::__ shareInfo share;52 ipc::shared::__info share; 53 53 54 54 share.position = ++shareNum; … … 105 105 dataCollectionGuard::getShare(unsigned long position) 106 106 { 107 dodoList<ipc::shared::__ shareInfo>::const_iterator i(shares.begin()), j(shares.end());107 dodoList<ipc::shared::__info>::const_iterator i(shares.begin()), j(shares.end()); 108 108 for (; i != j; ++i) 109 109 if (i->position == position) 110 110 { 111 current = *((dodoList<ipc::shared::__ shareInfo>::iterator *) & i);111 current = *((dodoList<ipc::shared::__info>::iterator *) & i); 112 112 113 113 return true; … … 125 125 dodoList<unsigned long> ids; 126 126 127 dodoList<ipc::shared::__ shareInfo>::const_iterator i(shares.begin()), j(shares.end());127 dodoList<ipc::shared::__info>::const_iterator i(shares.begin()), j(shares.end()); 128 128 for (; i != j; ++i) 129 129 ids.push_back(i->position); -
trunk/src/toolsNetwork.cc
r799 r809 137 137 //------------------------------------------------------------------- 138 138 139 __serv Info139 __serviceInfo 140 140 network::getServiceInfo(const dodoString &host, 141 141 const dodoString &protocol) … … 143 143 servent *ent = getservbyname(host.c_str(), protocol.c_str()); 144 144 145 __serv Info info;145 __serviceInfo info; 146 146 147 147 if (ent == NULL) … … 161 161 //------------------------------------------------------------------- 162 162 163 __serv Info163 __serviceInfo 164 164 network::getServiceInfo(int port, 165 165 const dodoString &protocol) … … 167 167 servent *ent = getservbyport(port, protocol.c_str()); 168 168 169 __serv Info info;169 __serviceInfo info; 170 170 171 171 if (ent == NULL) … … 187 187 //------------------------------------------------------------------- 188 188 189 __i fInfo189 __interfaceInfo 190 190 network::getInterfaceInfo(const dodoString &interface) 191 191 { … … 197 197 strcpy(ifr.ifr_name, interface.c_str()); 198 198 199 __i fInfo info;199 __interfaceInfo info; 200 200 char add[INET6_ADDRSTRLEN]; 201 201 -
trunk/src/toolsOs.cc
r807 r809 785 785 #ifdef DL_EXT 786 786 787 deinit SigModule deinit;787 deinitOsSignalModule deinit; 788 788 789 789 int handleSignal = toSignalNumber(signal); 790 790 if (handleSignal > 0 && handlesOpenedSig[handleSignal]) 791 791 { 792 deinit = (deinit SigModule)dlsym(handlesSig[handleSignal], "deinitSigModule");792 deinit = (deinitOsSignalModule)dlsym(handlesSig[handleSignal], "deinitOsSignalModule"); 793 793 if (deinit != NULL) 794 794 deinit(); … … 828 828 #ifdef DL_EXT 829 829 830 deinit SigModule deinit;830 deinitOsSignalModule deinit; 831 831 832 832 int handleSignal = toSignalNumber(OS_SIGNAL_ALARM); 833 833 if (handleSignal > 0 && handlesOpenedSig[handleSignal]) 834 834 { 835 deinit = (deinit SigModule)dlsym(handlesSig[handleSignal], "deinitSigModule");835 deinit = (deinitOsSignalModule)dlsym(handlesSig[handleSignal], "deinitOsSignalModule"); 836 836 if (deinit != NULL) 837 837 deinit(); … … 888 888 #ifdef DL_EXT 889 889 890 deinit SigModule deinit;890 deinitOsSignalModule deinit; 891 891 892 892 int handleSignal = toSignalNumber(OS_SIGNAL_ALARM); 893 893 if (handleSignal > 0 && handlesOpenedSig[handleSignal]) 894 894 { 895 deinit = (deinit SigModule)dlsym(handlesSig[handleSignal], "deinitSigModule");895 deinit = (deinitOsSignalModule)dlsym(handlesSig[handleSignal], "deinitOsSignalModule"); 896 896 if (deinit != NULL) 897 897 deinit(); … … 963 963 #ifdef DL_EXT 964 964 965 deinit SigModule deinit;965 deinitOsSignalModule deinit; 966 966 967 967 int handleSignal = toSignalNumber(signal); 968 968 if (handleSignal > 0 && handlesOpenedSig[handleSignal]) 969 969 { 970 deinit = (deinit SigModule)dlsym(handlesSig[handleSignal], "deinitSigModule");970 deinit = (deinitOsSignalModule)dlsym(handlesSig[handleSignal], "deinitOsSignalModule"); 971 971 if (deinit != NULL) 972 972 deinit(); … … 993 993 #ifdef DL_EXT 994 994 995 __sig Mod995 __signalMod 996 996 os::getModuleInfo(const dodoString &module, 997 997 void *toInit) … … 1005 1005 throw baseEx(ERRMODULE_TOOLSOS, OSEX_GETMODULEINFO, ERR_DYNLOAD, 0, dlerror(), __LINE__, __FILE__); 1006 1006 1007 init SigModule init = (initSigModule)dlsym(handle, "initSigModule");1007 initOsSignalModule init = (initOsSignalModule)dlsym(handle, "initOsSignalModule"); 1008 1008 if (init == NULL) 1009 1009 throw baseEx(ERRMODULE_TOOLSOS, OSEX_GETMODULEINFO, ERR_DYNLOAD, 0, dlerror(), __LINE__, __FILE__); 1010 1010 1011 __sig Mod mod = init(toInit);1011 __signalMod mod = init(toInit); 1012 1012 1013 1013 #ifndef DL_FAST … … 1035 1035 throw baseEx(ERRMODULE_TOOLSOS, OSEX_SETSIGNALHANDLER, ERR_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 1036 1036 1037 init SigModule init = (initSigModule)dlsym(handle, "initSigModule");1037 initOsSignalModule init = (initOsSignalModule)dlsym(handle, "initOsSignalModule"); 1038 1038 if (init == NULL) 1039 1039 throw baseEx(ERRMODULE_TOOLSOS, OSEX_SETSIGNALHANDLER, ERR_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 1040 1040 1041 __sig Mod mod = init(toInit);1042 1043 deinit SigModule deinit;1041 __signalMod mod = init(toInit); 1042 1043 deinitOsSignalModule deinit; 1044 1044 1045 1045 int handleSignal = toSignalNumber(mod.signal); 1046 1046 if (handleSignal > 0 && handlesOpenedSig[handleSignal]) 1047 1047 { 1048 deinit = (deinit SigModule)dlsym(handlesSig[handleSignal], "deinitSigModule");1048 deinit = (deinitOsSignalModule)dlsym(handlesSig[handleSignal], "deinitOsSignalModule"); 1049 1049 if (deinit != NULL) 1050 1050 deinit(); -
trunk/src/xexec.cc
r676 r809 43 43 deinitXexecModule deinit; 44 44 45 dodoList<__ execItem>::iterator i(preExec.exec.begin()), j(preExec.exec.end());45 dodoList<__xexecItem>::iterator i(preExec.exec.begin()), j(preExec.exec.end()); 46 46 for (; i != j; ++i) 47 47 { … … 80 80 81 81 int 82 xexec::addXExec(dodoList<__ execItem> &list,82 xexec::addXExec(dodoList<__xexecItem> &list, 83 83 inExec func, 84 84 void *obj, … … 86 86 void *data) 87 87 { 88 __ execItem temp;88 __xexecItem temp; 89 89 90 90 temp.data = data; … … 107 107 108 108 void 109 xexec::setStatXExec(dodoList<__ execItem> &list,109 xexec::setStatXExec(dodoList<__xexecItem> &list, 110 110 int position, 111 111 bool stat) … … 118 118 119 119 void 120 xexec::delXExec(dodoList<__ execItem> &list,120 xexec::delXExec(dodoList<__xexecItem> &list, 121 121 int position) 122 122 { … … 320 320 321 321 void 322 xexec::replaceXExec(dodoList<__ execItem> &list,322 xexec::replaceXExec(dodoList<__xexecItem> &list, 323 323 int position, 324 324 inExec func, … … 361 361 //------------------------------------------------------------------- 362 362 void 363 xexec::performXExec(__ execItemList &list) const363 xexec::performXExec(__xexecItemList &list) const 364 364 { 365 365 if (list.execDisabled) 366 366 return ; 367 367 368 dodoList<__ execItem>::iterator i(list.exec.begin()), j(list.exec.end());368 dodoList<__xexecItem>::iterator i(list.exec.begin()), j(list.exec.end()); 369 369 370 370 for (; i != j; ++i) … … 397 397 398 398 int 399 xexec::addXExecModule(dodoList<__ execItem> &list,399 xexec::addXExecModule(dodoList<__xexecItem> &list, 400 400 const dodoString &module, 401 401 void *obj, … … 404 404 void *toInit) 405 405 { 406 __ execItem temp;406 __xexecItem temp; 407 407 408 408 temp.data = data; … … 496 496 void *toInit) 497 497 { 498 __ execItem temp;498 __xexecItem temp; 499 499 500 500 temp.data = data; … … 564 564 565 565 bool 566 xexec::getXexec(dodoList<__ execItem> &list,566 xexec::getXexec(dodoList<__xexecItem> &list, 567 567 int position) 568 568 { 569 dodoList<__ execItem>::iterator i(list.begin()), j(list.end());569 dodoList<__xexecItem>::iterator i(list.begin()), j(list.end()); 570 570 for (; i != j; ++i) 571 571 if (i->position == position) -
trunk/tests/iostd_test/test.cc
r806 r809 60 60 st.flush(); 61 61 62 #ifndef IOSTDIO_WO_XEXEC 63 64 st.disablePreExec(pos); 65 66 #endif 62 67 dodoString o; 63 68 … … 68 73 69 74 cout << o.size() << "\n"; 70 71 #ifndef IOSTDIO_WO_XEXEC 72 73 st.disablePreExec(pos); 74 75 #endif 75 cout << o << "\n"; 76 76 77 77 st.outSize = 4; 78 78 st.writeString("1234567890"); 79 st.writeStr ing("\n");79 st.writeStreamString("\n"); 80 80 81 81 st.writeStreamString(o); -
trunk/tests/toolsmisc_test/module.cc
r806 r809 17 17 } 18 18 19 __ exMod20 init ExModule(void *data)19 __baseExMod 20 initBaseExModule(void *data) 21 21 { 22 __ exMod module;22 __baseExMod module; 23 23 24 24 strcpy(module.name,"test"); … … 31 31 32 32 void 33 deinit ExModule()33 deinitBaseExModule() 34 34 { 35 35 std::cout << "deactivation.";
Note: See TracChangeset
for help on using the changeset viewer.
