Changeset 1187:01c8a109ae49


Ignore:
Timestamp:
03/21/09 08:41:39 (3 years ago)
Author:
niam
Branch:
default
Message:

header inclusion cleanup in pc::(job|process)::collection, pc::sync::process::(data::(single|collection)|section)

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/libdodo/pcJobCollection.h

    r1160 r1187  
    3232 
    3333#include <libdodo/directives.h> 
     34 
    3435#include <libdodo/types.h> 
    3536 
     
    148149 
    149150#ifdef DL_EXT 
    150  
    151151                                /** 
    152152                                 * add function as a job from library 
     
    159159                                                                                  void             *data, 
    160160                                                                                  void             *toInit = NULL) = 0; 
    161  
    162161#endif 
    163162                        }; 
  • trunk/include/libdodo/pcProcessCollection.h

    r1185 r1187  
    3333#include <libdodo/directives.h> 
    3434 
    35 #ifdef DL_EXT 
    36  
    37 #include <dlfcn.h> 
    38  
    39 #endif 
    40  
    41 #include <sys/types.h> 
    42 #include <signal.h> 
    43 #include <unistd.h> 
    44 #include <sys/wait.h> 
    45  
    4635#include <libdodo/types.h> 
    4736#include <libdodo/pcJobCollection.h> 
    48 #include <libdodo/pcProcessCollectionEx.h> 
    4937 
    5038namespace dodo 
     
    9280 
    9381#ifdef DL_EXT 
    94  
    9582                        /** 
    9683                         * @struct __processMod 
     
    118105                         */ 
    119106                        typedef void (*deinitIpcProcessCollectionModule)(); 
    120  
    121107#endif 
    122108 
     
    281267 
    282268#ifdef DL_EXT 
    283  
    284269                                /** 
    285270                                 * add function as a process from library 
     
    300285                                static __processMod getModuleInfo(const dodoString &module, 
    301286                                                                                                  void             *toInit = NULL); 
    302  
    303287#endif 
    304288 
  • trunk/include/libdodo/pcProcessCollectionEx.h

    r1111 r1187  
    7474 
    7575#ifdef DL_EXT 
    76  
    7776                                COLLECTIONEX_GETMODULEINFO, 
    7877                                COLLECTIONEX_ADD, 
    79  
    8078#endif 
    8179                        }; 
  • trunk/include/libdodo/pcSyncProcessDataCollection.h

    r1166 r1187  
    3535#include <libdodo/types.h> 
    3636#include <libdodo/pcSyncDataCollection.h> 
    37 #include <libdodo/pcSyncProcessDataCollectionEx.h> 
    38 #include <libdodo/pcSyncProcessSection.h> 
    39 #include <libdodo/pcSyncProtector.h> 
    4037 
    4138namespace dodo 
     
    4542                namespace sync 
    4643                { 
     44                        class section; 
     45 
    4746                        namespace process 
    4847                        { 
  • trunk/include/libdodo/pcSyncProcessDataSingle.h

    r1160 r1187  
    3333#include <libdodo/directives.h> 
    3434 
    35 #ifdef XSI_IPC 
    36  
    37 #include <sys/ipc.h> 
    38 #include <sys/sem.h> 
    39  
    40 #else /*POSIX_SEMAPHORES*/ 
    41  
    42 #include <fcntl.h> 
    43 #include <semaphore.h> 
    44  
    45 #endif 
    46  
    47 #include <time.h> 
    48  
    49 #include <libdodo/pcSyncProcessDataSingleEx.h> 
    5035#include <libdodo/pcSyncDataSingle.h> 
    51 #include <libdodo/types.h> 
    52 #include <libdodo/toolsMisc.h> 
    53 #include <libdodo/toolsCode.h> 
    5436 
    5537namespace dodo 
     
    6345                                namespace data 
    6446                                { 
     47                                        /** 
     48                                         * @struct __semaphore 
     49                                         * @brief defines system semaphore 
     50                                         */ 
     51                                        struct __semaphore; 
     52 
    6553                                        /** 
    6654                                         * @class single 
     
    149137                                                void *data;             ///< shared data 
    150138 
    151 #ifdef XSI_IPC 
    152                                                 int keeper;             ///< semaphore 
    153                                                 int key;                ///< key for the semaphore 
    154                                                 union semun 
    155                                                 { 
    156                                                         int             val; 
    157                                                         struct semid_ds *buf; 
    158                                                         ushort          * array; 
    159                                                 } control;              ///< semaphore control structure 
    160  
    161                                                 sembuf operations[1];   ///< semaphore operations 
    162 #else 
    163                                                 sem_t *keeper;          ///< semaphore 
    164                                                 dodoString key;         ///< key for the semaphore 
    165 #endif 
     139                                                __semaphore *semaphore; 
    166140 
    167141                                                bool autogenerated;     ///< true if key was autogenerated 
    168142                                                bool acquired;          ///< true if the semaphore was aquired 
    169  
    170                                                 timespec timeout;       ///< lock timeout 
    171143                                        }; 
    172144                                }; 
  • trunk/include/libdodo/pcSyncProcessSection.h

    r1160 r1187  
    3333#include <libdodo/directives.h> 
    3434 
    35 #ifdef XSI_IPC 
    36  
    37 #include <sys/ipc.h> 
    38 #include <sys/sem.h> 
    39  
    40 #else /*POSIX_SEMAPHORES*/ 
    41  
    42 #include <fcntl.h> 
    43 #include <semaphore.h> 
    44  
    45 #endif 
    46  
    4735#include <libdodo/pcSyncSection.h> 
    48 #include <libdodo/toolsMisc.h> 
    49 #include <libdodo/toolsCode.h> 
    50 #include <libdodo/pcSyncProcessSectionEx.h> 
    51 #include <libdodo/types.h> 
    5236 
    5337namespace dodo 
     
    5943                        namespace process 
    6044                        { 
     45                                namespace data 
     46                                { 
     47                                        struct __semaphore; 
     48                                }; 
     49 
    6150                                /** 
    6251                                 * @class section 
     
    128117                                  protected: 
    129118 
    130 #ifdef XSI_IPC 
    131                                         int keeper;             ///< semaphore 
    132                                         int key;                ///< key for the semaphore 
    133                                         union semun 
    134                                         { 
    135                                                 int             val; 
    136                                                 struct semid_ds *buf; 
    137                                                 ushort          * array; 
    138                                         } control;              ///< semaphore control structure 
    139  
    140                                         sembuf operations[1];   ///< semaphore operations 
    141 #else 
    142                                         sem_t * keeper;         ///< semaphore 
    143                                         dodoString key;         ///< key for the semaphore 
    144 #endif 
     119                                        data::__semaphore *semaphore; 
    145120 
    146121                                        bool autogenerated;     ///< true if key was autogenerated 
  • trunk/src/pcJobCollection.cc

    r978 r1187  
    2828 */ 
    2929 
     30#include <libdodo/directives.h> 
     31 
    3032#include <libdodo/pcJobCollection.h> 
    3133 
  • trunk/src/pcProcessCollection.cc

    r1166 r1187  
    2828 */ 
    2929 
     30#include <libdodo/directives.h> 
     31 
     32#ifdef DL_EXT 
     33#include <dlfcn.h> 
     34#endif 
     35 
     36#include <sys/types.h> 
     37#include <signal.h> 
     38#include <unistd.h> 
     39#include <sys/wait.h> 
    3040 
    3141#include <libdodo/pcProcessCollection.h> 
     42#include <libdodo/types.h> 
     43#include <libdodo/pcJobCollection.h> 
     44#include <libdodo/pcProcessCollectionEx.h> 
    3245 
    3346using namespace dodo::pc::process; 
     
    91104 
    92105#ifdef DL_EXT 
    93  
    94106                if (i->handle != NULL) 
    95107                { 
     
    104116#endif 
    105117                } 
    106  
    107118#endif 
    108119        } 
     
    221232 
    222233#ifdef DL_EXT 
    223  
    224234                if (current->handle != NULL) 
    225235                { 
     
    239249#endif 
    240250                } 
    241  
    242251#endif 
    243252 
     
    323332 
    324333#ifdef DL_EXT 
    325  
    326334                if (current->handle != NULL) 
    327335                { 
     
    341349#endif 
    342350                } 
    343  
    344351#endif 
    345352 
     
    586593 
    587594#ifdef DL_EXT 
    588  
    589595__processMod 
    590596collection::getModuleInfo(const dodoString &module, 
     
    663669        return process.position; 
    664670} 
    665  
    666671#endif 
    667672 
  • trunk/src/pcSyncDataCollection.cc

    r979 r1187  
    2828 */ 
    2929 
     30#include <libdodo/directives.h> 
    3031 
    3132#include <libdodo/pcSyncDataCollection.h> 
  • trunk/src/pcSyncDataSingle.cc

    r979 r1187  
    2828 */ 
    2929 
     30#include <libdodo/directives.h> 
    3031 
    3132#include <libdodo/pcSyncDataSingle.h> 
  • trunk/src/pcSyncProcessDataCollection.cc

    r1162 r1187  
    2828 */ 
    2929 
     30#include <libdodo/directives.h> 
    3031 
    3132#include <libdodo/pcSyncProcessDataCollection.h> 
     33#include <libdodo/types.h> 
     34#include <libdodo/pcSyncDataCollection.h> 
     35#include <libdodo/pcSyncProcessDataCollectionEx.h> 
     36#include <libdodo/pcSyncProcessSection.h> 
     37#include <libdodo/pcSyncProtector.h> 
    3238 
    3339using namespace dodo::pc::sync::process::data; 
  • trunk/src/pcSyncProcessDataSingle.cc

    r1186 r1187  
    2828 */ 
    2929 
     30#include <libdodo/directives.h> 
     31 
     32#ifdef XSI_IPC 
     33#include <sys/ipc.h> 
     34#include <sys/sem.h> 
     35#else /*POSIX_SEMAPHORES*/ 
     36#include <fcntl.h> 
     37#include <semaphore.h> 
     38#endif 
     39 
     40#include <time.h> 
     41 
     42#include "pcSyncProcessDataSingle.inline" 
    3043 
    3144#include <libdodo/pcSyncProcessDataSingle.h> 
     45#include <libdodo/pcSyncDataSingle.h> 
     46#include <libdodo/pcSyncProcessDataSingleEx.h> 
     47#include <libdodo/types.h> 
     48#include <libdodo/toolsMisc.h> 
     49#include <libdodo/toolsCode.h>; 
    3250 
    3351using namespace dodo::pc::sync::process::data; 
     52 
     53__semaphore::__semaphore() : 
     54#ifdef XSI_IPC 
     55        keeper(-1) 
     56#else 
     57        keeper(NULL) 
     58#endif 
     59{ 
     60} 
     61 
     62//------------------------------------------------------------------- 
    3463 
    3564single::single(single &sts) 
     
    4271                                                        autogenerated(false), 
    4372                                                        acquired(false), 
    44 #ifdef XSI_IPC 
    45  
    46                                                         keeper(-1) 
    47  
    48 #else 
    49  
    50                                                         keeper(NULL) 
    51  
    52 #endif 
    53 { 
    54 #ifdef XSI_IPC 
    55  
     73                                                        semaphore(new __semaphore) 
     74{ 
     75#ifdef XSI_IPC 
    5676        if (a_key == 0) 
    5777        { 
    58                 key = tools::misc::iRandom(); 
     78                semaphore->key = tools::misc::iRandom(); 
    5979 
    6080                autogenerated = true; 
     
    6282        else 
    6383        { 
    64                 key = a_key; 
    65         } 
    66  
    67         operations[0].sem_num = 0; 
    68         operations[0].sem_flg = 0; 
    69  
    70         keeper = semget(key, 1, S_IRUSR | S_IWUSR | IPC_CREAT); 
    71         if (keeper == -1) 
     84                semaphore->key = a_key; 
     85        } 
     86 
     87        semaphore->operations[0].sem_num = 0; 
     88        semaphore->operations[0].sem_flg = 0; 
     89 
     90        semaphore->keeper = semget(semaphore->key, 1, S_IRUSR | S_IWUSR | IPC_CREAT); 
     91        if (semaphore->keeper == -1) 
    7292        { 
    7393                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_SINGLE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    7494        } 
    7595 
    76         control.val = 1; 
    77  
    78         if (semctl(keeper, 0, SETVAL, control) == -1) 
     96        semaphore->control.val = 1; 
     97 
     98        if (semctl(semaphore->keeper, 0, SETVAL, semaphore->control) == -1) 
    7999        { 
    80100                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_SINGLE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    81101        } 
    82  
    83 #else 
    84  
    85         key = '/'; 
     102#else 
     103        semaphore->key = '/'; 
    86104 
    87105        if (a_key == 0) 
     
    90108                tools::misc::random(_key, SH_KEY_SIZE / 2 - 1); 
    91109 
    92                 key.append(tools::code::binToHex(dodoString(_key, SH_KEY_SIZE / 2 - 1))); 
     110                semaphore->key.append(tools::code::binToHex(dodoString(_key, SH_KEY_SIZE / 2 - 1))); 
    93111 
    94112                autogenerated = true; 
     
    99117                memcpy(_key, &a_key, 4); 
    100118 
    101                 key.append(tools::code::binToHex(dodoString(_key, 4))); 
    102         } 
    103  
    104         keeper = sem_open(key.c_str(), O_CREAT, S_IRUSR | S_IWUSR, 1); 
    105         if (keeper == SEM_FAILED) 
     119                semaphore->key.append(tools::code::binToHex(dodoString(_key, 4))); 
     120        } 
     121 
     122        semaphore->keeper = sem_open(semaphore->key.c_str(), O_CREAT, S_IRUSR | S_IWUSR, 1); 
     123        if (semaphore->keeper == SEM_FAILED) 
    106124        { 
    107125                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_SINGLE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    108126        } 
    109  
    110127#endif 
    111128} 
     
    116133                                   autogenerated(false), 
    117134                                   acquired(false), 
    118 #ifdef XSI_IPC 
    119  
    120                                    keeper(-1) 
    121  
    122 #else 
    123  
    124                                    keeper(NULL) 
    125  
    126 #endif 
     135                                   semaphore(new __semaphore) 
    127136{ 
    128137} 
     
    133142{ 
    134143#ifdef XSI_IPC 
    135  
    136         if (keeper != -1) 
     144        if (semaphore->keeper != -1) 
    137145        { 
    138146                if (autogenerated) 
    139147                { 
    140                         semctl(keeper, 0, IPC_RMID); 
     148                        semctl(semaphore->keeper, 0, IPC_RMID); 
    141149                } 
    142150                else 
     
    144152                        if (acquired) 
    145153                        { 
    146                                 operations[0].sem_op = 1; 
    147  
    148                                 semop(keeper, operations, 1); 
    149                         } 
    150                 } 
    151         } 
    152 #else 
    153  
    154         if (keeper != NULL) 
     154                                semaphore->operations[0].sem_op = 1; 
     155 
     156                                semop(semaphore->keeper, semaphore->operations, 1); 
     157                        } 
     158                } 
     159        } 
     160#else 
     161        if (semaphore->keeper != NULL) 
    155162        { 
    156163                if (acquired) 
    157164                { 
    158                         sem_post(keeper); 
    159                 } 
    160  
    161                 sem_close(keeper); 
     165                        sem_post(semaphore->keeper); 
     166                } 
     167 
     168                sem_close(semaphore->keeper); 
    162169 
    163170                if (autogenerated) 
    164171                { 
    165                         sem_unlink(key.c_str()); 
    166                 } 
    167         } 
    168 #endif 
     172                        sem_unlink(semaphore->key.c_str()); 
     173                } 
     174        } 
     175#endif 
     176 
     177        delete semaphore; 
    169178} 
    170179 
     
    175184{ 
    176185#ifdef XSI_IPC 
    177  
    178         if (keeper != -1) 
     186        if (semaphore->keeper != -1) 
    179187        { 
    180188                if (autogenerated) 
    181189                { 
    182                         if (semctl(keeper, 0, IPC_RMID) == -1) 
     190                        if (semctl(semaphore->keeper, 0, IPC_RMID) == -1) 
    183191                        { 
    184192                                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_CLOSE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
     
    189197                        if (acquired) 
    190198                        { 
    191                                 operations[0].sem_op = 1; 
    192  
    193                                 if (semop(keeper, operations, 1) == -1) 
     199                                semaphore->operations[0].sem_op = 1; 
     200 
     201                                if (semop(semaphore->keeper, semaphore->operations, 1) == -1) 
    194202                                { 
    195203                                        throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_CLOSE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
     
    199207        } 
    200208 
    201         keeper = -1; 
    202  
    203 #else 
    204  
    205         if (keeper != NULL) 
     209        semaphore->keeper = -1; 
     210#else 
     211        if (semaphore->keeper != NULL) 
    206212        { 
    207213                if (acquired) 
    208214                { 
    209                         if (sem_post(keeper) == -1) 
     215                        if (sem_post(semaphore->keeper) == -1) 
    210216                        { 
    211217                                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_CLOSE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
     
    213219                } 
    214220 
    215                 if (sem_close(keeper) == -1) 
     221                if (sem_close(semaphore->keeper) == -1) 
    216222                { 
    217223                        throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_CLOSE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
     
    220226                if (autogenerated) 
    221227                { 
    222                         if (sem_unlink(key.c_str())) 
     228                        if (sem_unlink(semaphore->key.c_str())) 
    223229                        { 
    224230                                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_CLOSE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
     
    227233        } 
    228234 
    229         keeper = NULL; 
    230  
     235        semaphore->keeper = NULL; 
    231236#endif 
    232237} 
     
    240245 
    241246#ifdef XSI_IPC 
    242  
    243247        if (a_key == 0) 
    244248        { 
    245                 key = tools::misc::iRandom(); 
     249                semaphore->key = tools::misc::iRandom(); 
    246250 
    247251                autogenerated = true; 
     
    249253        else 
    250254        { 
    251                 key = a_key; 
    252         } 
    253  
    254         operations[0].sem_num = 0; 
    255         operations[0].sem_flg = 0; 
    256  
    257         keeper = semget(key, 1, S_IRUSR | S_IWUSR | IPC_CREAT); 
    258         if (keeper == -1) 
     255                semaphore->key = a_key; 
     256        } 
     257 
     258        semaphore->operations[0].sem_num = 0; 
     259        semaphore->operations[0].sem_flg = 0; 
     260 
     261        semaphore->keeper = semget(semaphore->key, 1, S_IRUSR | S_IWUSR | IPC_CREAT); 
     262        if (semaphore->keeper == -1) 
    259263        { 
    260264                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_OPEN, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    261265        } 
    262266 
    263         control.val = 1; 
    264  
    265         if (semctl(keeper, 0, SETVAL, control) == -1) 
     267        semaphore->control.val = 1; 
     268 
     269        if (semctl(semaphore->keeper, 0, SETVAL, semaphore->control) == -1) 
    266270        { 
    267271                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_OPEN, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    268272        } 
    269  
    270 #else 
    271  
    272         key = '/'; 
     273#else 
     274        semaphore->key = '/'; 
    273275 
    274276        if (a_key == 0) 
     
    277279                tools::misc::random(_key, SH_KEY_SIZE / 2 - 1); 
    278280 
    279                 key.append(tools::code::binToHex(dodoString(_key, SH_KEY_SIZE / 2 - 1))); 
     281                semaphore->key.append(tools::code::binToHex(dodoString(_key, SH_KEY_SIZE / 2 - 1))); 
    280282 
    281283                autogenerated = true; 
     
    286288                memcpy(_key, &a_key, 4); 
    287289 
    288                 key.append(tools::code::binToHex(dodoString(_key, 4))); 
    289         } 
    290  
    291         keeper = sem_open(key.c_str(), O_CREAT, S_IRUSR | S_IWUSR, 1); 
    292         if (keeper == SEM_FAILED) 
     290                semaphore->key.append(tools::code::binToHex(dodoString(_key, 4))); 
     291        } 
     292 
     293        semaphore->keeper = sem_open(semaphore->key.c_str(), O_CREAT, S_IRUSR | S_IWUSR, 1); 
     294        if (semaphore->keeper == SEM_FAILED) 
    293295        { 
    294296                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_OPEN, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    295297        } 
    296  
    297298#endif 
    298299} 
     
    304305{ 
    305306#ifdef XSI_IPC 
    306  
    307307        int keeper = semget(a_key, 1, S_IRUSR | S_IWUSR); 
    308308        if (keeper == -1) 
     
    315315                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_REMOVE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    316316        } 
    317  
    318 #else 
    319  
     317#else 
    320318        dodoString key = "/"; 
    321319 
     
    329327                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_REMOVE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    330328        } 
    331  
    332329#endif 
    333330} 
     
    339336{ 
    340337#ifdef XSI_IPC 
    341  
    342         if (keeper == -1) 
     338        if (semaphore->keeper == -1) 
    343339        { 
    344340                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_SET, exception::ERRNO_LIBDODO, SINGLEEX_NOTOPENED, PCSYNCPROCESSDATASINGLEEX_NOTOPENED_STR, __LINE__, __FILE__); 
    345341        } 
    346342 
    347         operations[0].sem_op = -1; 
    348  
    349         if (semop(keeper, operations, 1) != 0) 
     343        semaphore->operations[0].sem_op = -1; 
     344 
     345        if (semop(semaphore->keeper, semaphore->operations, 1) != 0) 
    350346        { 
    351347                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_SET, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
     
    354350        data = a_data; 
    355351 
    356         operations[0].sem_op = 1; 
    357  
    358         if (semop(keeper, operations, 1) != 0) 
     352        semaphore->operations[0].sem_op = 1; 
     353 
     354        if (semop(semaphore->keeper, semaphore->operations, 1) != 0) 
    359355        { 
    360356                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_SET, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    361357        } 
    362  
    363 #else 
    364  
    365         if (keeper == NULL) 
     358#else 
     359        if (semaphore->keeper == NULL) 
    366360        { 
    367361                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_SET, exception::ERRNO_LIBDODO, SINGLEEX_NOTOPENED, PCSYNCPROCESSDATASINGLEEX_NOTOPENED_STR, __LINE__, __FILE__); 
    368362        } 
    369363 
    370         if (sem_wait(keeper) != 0) 
     364        if (sem_wait(semaphore->keeper) != 0) 
    371365        { 
    372366                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_SET, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
     
    375369        data = a_data; 
    376370 
    377         if (sem_post(keeper) != 0) 
     371        if (sem_post(semaphore->keeper) != 0) 
    378372        { 
    379373                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_SET, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    380374        } 
    381  
    382375#endif 
    383376} 
     
    397390{ 
    398391#ifdef XSI_IPC 
    399  
    400         if (keeper == -1) 
     392        if (semaphore->keeper == -1) 
    401393        { 
    402394                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_ACQUIRE, exception::ERRNO_LIBDODO, SINGLEEX_NOTOPENED, PCSYNCPROCESSDATASINGLEEX_NOTOPENED_STR, __LINE__, __FILE__); 
     
    405397        if (microseconds == 0) 
    406398        { 
    407                 operations[0].sem_op = -1; 
    408  
    409                 if (semop(keeper, operations, 1) != 0) 
     399                semaphore->operations[0].sem_op = -1; 
     400 
     401                if (semop(semaphore->keeper, semaphore->operations, 1) != 0) 
    410402                { 
    411403                        throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_ACQUIRE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
     
    416408                bool locked = true; 
    417409                unsigned long slept = 0; 
    418  
    419                 operations[0].sem_op = -1; 
    420                 operations[0].sem_flg = IPC_NOWAIT; 
     410                timespec timeout = {0, 10}; 
     411 
     412                semaphore->operations[0].sem_op = -1; 
     413                semaphore->operations[0].sem_flg = IPC_NOWAIT; 
    421414 
    422415                while (locked) 
    423416                { 
    424                         if (semop(keeper, operations, 1) != 0) 
     417                        if (semop(semaphore->keeper, semaphore->operations, 1) != 0) 
    425418                        { 
    426419                                if (errno != EAGAIN) 
    427420                                { 
    428                                         operations[0].sem_flg = 0; 
     421                                        semaphore->operations[0].sem_flg = 0; 
    429422 
    430423                                        throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_ACQUIRE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
     
    433426                                if (nanosleep(&timeout, NULL) == -1) 
    434427                                { 
    435                                         operations[0].sem_flg = 0; 
     428                                        semaphore->operations[0].sem_flg = 0; 
    436429 
    437430                                        throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_ACQUIRE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
     
    442435                                if (slept > microseconds) 
    443436                                { 
    444                                         operations[0].sem_flg = 0; 
     437                                        semaphore->operations[0].sem_flg = 0; 
    445438 
    446439                                        throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_ACQUIRE, exception::ERRNO_LIBDODO, SINGLEEX_CANNOTLOCK, PCSYNCPROCESSDATASINGLEEX_CANNOTLOCK_STR, __LINE__, __FILE__); 
     
    453446                } 
    454447        } 
    455  
    456 #else 
    457  
    458         if (keeper == NULL) 
     448#else 
     449        if (semaphore->keeper == NULL) 
    459450        { 
    460451                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_ACQUIRE, exception::ERRNO_LIBDODO, SINGLEEX_NOTOPENED, PCSYNCPROCESSDATASINGLEEX_NOTOPENED_STR, __LINE__, __FILE__); 
     
    463454        if (microseconds == 0) 
    464455        { 
    465                 if (sem_wait(keeper) != 0) 
     456                if (sem_wait(semaphore->keeper) != 0) 
    466457                { 
    467458                        throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_ACQUIRE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
     
    472463                bool locked = true; 
    473464                unsigned long slept = 0; 
     465                timespec timeout = {0, 10}; 
    474466 
    475467                while (locked) 
    476468                { 
    477                         if (sem_trywait(keeper) != 0) 
     469                        if (sem_trywait(semaphore->keeper) != 0) 
    478470                        { 
    479471                                if (errno != EAGAIN) 
     
    500492                } 
    501493        } 
    502  
    503  
    504494#endif 
    505495 
     
    515505{ 
    516506#ifdef XSI_IPC 
    517  
    518         if (keeper == -1) 
     507        if (semaphore->keeper == -1) 
    519508        { 
    520509                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_RELEASE, exception::ERRNO_LIBDODO, SINGLEEX_NOTOPENED, PCSYNCPROCESSDATASINGLEEX_NOTOPENED_STR, __LINE__, __FILE__); 
    521510        } 
    522511 
    523         operations[0].sem_op = 1; 
    524  
    525         if (semop(keeper, operations, 1) != 0) 
     512        semaphore->operations[0].sem_op = 1; 
     513 
     514        if (semop(semaphore->keeper, semaphore->operations, 1) != 0) 
    526515        { 
    527516                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_RELEASE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    528517        } 
    529  
    530 #else 
    531  
    532         if (keeper == NULL) 
     518#else 
     519        if (semaphore->keeper == NULL) 
    533520        { 
    534521                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_RELEASE, exception::ERRNO_LIBDODO, SINGLEEX_NOTOPENED, PCSYNCPROCESSDATASINGLEEX_NOTOPENED_STR, __LINE__, __FILE__); 
    535522        } 
    536523 
    537         if (sem_post(keeper) != 0) 
     524        if (sem_post(semaphore->keeper) != 0) 
    538525        { 
    539526                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_RELEASE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    540527        } 
    541  
    542528#endif 
    543529 
  • trunk/src/pcSyncProcessSection.cc

    r1186 r1187  
    2828 */ 
    2929 
     30#include <libdodo/directives.h> 
     31 
     32#ifdef XSI_IPC 
     33#include <sys/ipc.h> 
     34#include <sys/sem.h> 
     35#else /*POSIX_SEMAPHORES*/ 
     36#include <fcntl.h> 
     37#include <semaphore.h> 
     38#endif 
     39 
     40#include "pcSyncProcessDataSingle.inline" 
     41 
    3042#include <libdodo/pcSyncProcessSection.h> 
     43#include <libdodo/pcSyncSection.h> 
     44#include <libdodo/toolsMisc.h> 
     45#include <libdodo/toolsCode.h> 
     46#include <libdodo/pcSyncProcessSectionEx.h> 
     47#include <libdodo/types.h> 
    3148 
    3249using namespace dodo::pc::sync::process; 
     
    4057section::section(int a_key) : autogenerated(false), 
    4158                                                          acquired(false), 
    42 #ifdef XSI_IPC 
    43  
    44                                                           keeper(-1) 
    45  
    46 #else 
    47  
    48                                                           keeper(NULL) 
    49  
    50 #endif 
    51 { 
    52 #ifdef XSI_IPC 
    53  
     59                                                          semaphore(new pc::sync::process::data::__semaphore) 
     60{ 
     61#ifdef XSI_IPC 
    5462        if (a_key == 0) 
    5563        { 
    56                 key = tools::misc::iRandom(); 
     64                semaphore->key = tools::misc::iRandom(); 
    5765 
    5866                autogenerated = true; 
     
    6371        } 
    6472 
    65         operations[0].sem_num = 0; 
    66  
    67         operations[0].sem_flg = 0; 
    68  
    69         keeper = semget(key, 1, S_IRUSR | S_IWUSR | IPC_CREAT); 
    70         if (keeper == -1) 
     73        semaphore->operations[0].sem_num = 0; 
     74 
     75        semaphore->operations[0].sem_flg = 0; 
     76 
     77        semaphore->keeper = semget(semaphore->key, 1, S_IRUSR | S_IWUSR | IPC_CREAT); 
     78        if (semaphore->keeper == -1) 
    7179        { 
    7280                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_SECTION, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    7381        } 
    7482 
    75         control.val = 1; 
    76  
    77         if (semctl(keeper, 0, SETVAL, control) == -1) 
     83        semaphore->control.val = 1; 
     84 
     85        if (semctl(semaphore->keeper, 0, SETVAL, semaphore->control) == -1) 
    7886        { 
    7987                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_SECTION, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    8088        } 
    81  
    82 #else 
    83  
    84         key = '/'; 
     89#else 
     90        semaphore->key = '/'; 
    8591 
    8692        if (a_key == 0) 
     
    8995                tools::misc::random(_key, SH_KEY_SIZE / 2 - 1); 
    9096 
    91                 key.append(tools::code::binToHex(dodoString(_key, SH_KEY_SIZE / 2 - 1))); 
     97                semaphore->key.append(tools::code::binToHex(dodoString(_key, SH_KEY_SIZE / 2 - 1))); 
    9298 
    9399                autogenerated = true; 
     
    98104                memcpy(_key, &a_key, 4); 
    99105 
    100                 key.append(tools::code::binToHex(dodoString(_key, 4))); 
    101         } 
    102  
    103         keeper = sem_open(key.c_str(), O_CREAT, S_IRUSR | S_IWUSR, 1); 
    104         if (keeper == SEM_FAILED) 
     106                semaphore->key.append(tools::code::binToHex(dodoString(_key, 4))); 
     107        } 
     108 
     109        semaphore->keeper = sem_open(semaphore->key.c_str(), O_CREAT, S_IRUSR | S_IWUSR, 1); 
     110        if (semaphore->keeper == SEM_FAILED) 
    105111        { 
    106112                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_SECTION, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    107113        } 
    108  
    109114#endif 
    110115} 
     
    114119section::section() : autogenerated(false), 
    115120                                         acquired(false), 
    116 #ifdef XSI_IPC 
    117  
    118                                          keeper(-1) 
    119  
    120 #else 
    121  
    122                                          keeper(NULL) 
    123  
    124 #endif 
     121                                         semaphore(new pc::sync::process::data::__semaphore) 
    125122{ 
    126123} 
     
    131128{ 
    132129#ifdef XSI_IPC 
    133  
    134         if (keeper != -1) 
     130        if (semaphore->keeper != -1) 
    135131        { 
    136132                if (autogenerated) 
    137133                { 
    138                         semctl(keeper, 0, IPC_RMID); 
     134                        semctl(semaphore->keeper, 0, IPC_RMID); 
    139135                } 
    140136                else 
     
    142138                        if (acquired) 
    143139                        { 
    144                                 operations[0].sem_op = 1; 
    145  
    146                                 semop(keeper, operations, 1); 
    147                         } 
    148                 } 
    149         } 
    150  
    151 #else 
    152  
    153         if (keeper != NULL) 
     140                                semaphore->operations[0].sem_op = 1; 
     141 
     142                                semop(semaphore->keeper, semaphore->operations, 1); 
     143                        } 
     144                } 
     145        } 
     146#else 
     147        if (semaphore->keeper != NULL) 
    154148        { 
    155149                if (acquired) 
    156150                { 
    157                         sem_post(keeper); 
    158                 } 
    159  
    160                 sem_close(keeper); 
     151                        sem_post(semaphore->keeper); 
     152                } 
     153 
     154                sem_close(semaphore->keeper); 
    161155 
    162156                if (autogenerated) 
    163157                { 
    164                         sem_unlink(key.c_str()); 
    165                 } 
    166         } 
    167  
    168 #endif 
     158                        sem_unlink(semaphore->key.c_str()); 
     159                } 
     160        } 
     161#endif 
     162 
     163        delete semaphore; 
    169164} 
    170165 
     
    175170{ 
    176171#ifdef XSI_IPC 
    177  
    178         if (keeper != -1) 
     172        if (semaphore->keeper != -1) 
    179173        { 
    180174                if (autogenerated) 
    181175                { 
    182                         if (semctl(keeper, 0, IPC_RMID) == -1) 
     176                        if (semctl(semaphore->keeper, 0, IPC_RMID) == -1) 
    183177                        { 
    184178                                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_CLOSE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
     
    188182                                if (acquired) 
    189183                                { 
    190                                         operations[0].sem_op = 1; 
    191  
    192                                         if (semop(keeper, operations, 1) == -1) 
     184                                        semaphore->operations[0].sem_op = 1; 
     185 
     186                                        if (semop(semaphore->keeper, semaphore->operations, 1) == -1) 
    193187                                        { 
    194188                                                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_CLOSE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
     
    199193        } 
    200194 
    201         keeper = -1; 
    202  
    203 #else 
    204  
    205         if (keeper != NULL) 
     195        semaphore->keeper = -1; 
     196#else 
     197        if (semaphore->keeper != NULL) 
    206198        { 
    207199                if (acquired) 
    208200                { 
    209                         if (sem_post(keeper) == -1) 
     201                        if (sem_post(semaphore->keeper) == -1) 
    210202                        { 
    211203                                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_CLOSE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
     
    213205                } 
    214206 
    215                 if (sem_close(keeper) == -1) 
     207                if (sem_close(semaphore->keeper) == -1) 
    216208                { 
    217209                        throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_CLOSE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
     
    220212                if (autogenerated) 
    221213                { 
    222                         if (sem_unlink(key.c_str()) == -1) 
     214                        if (sem_unlink(semaphore->key.c_str()) == -1) 
    223215                        { 
    224216                                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_CLOSE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
     
    227219        } 
    228220 
    229         keeper = NULL; 
    230  
     221        semaphore->keeper = NULL; 
    231222#endif 
    232223} 
     
    240231 
    241232#ifdef XSI_IPC 
    242  
    243233        if (a_key == 0) 
    244234        { 
    245                 key = tools::misc::iRandom(); 
     235                semaphore->key = tools::misc::iRandom(); 
    246236 
    247237                autogenerated = true; 
     
    249239        else 
    250240        { 
    251                 key = a_key; 
    252         } 
    253  
    254         operations[0].sem_num = 0; 
    255         operations[0].sem_flg = 0; 
    256  
    257         keeper = semget(key, 1, S_IRUSR | S_IWUSR | IPC_CREAT); 
    258         if (keeper == -1) 
     241                semaphore->key = a_key; 
     242        } 
     243 
     244        semaphore->operations[0].sem_num = 0; 
     245        semaphore->operations[0].sem_flg = 0; 
     246 
     247        semaphore->keeper = semget(semaphore->key, 1, S_IRUSR | S_IWUSR | IPC_CREAT); 
     248        if (semaphore->keeper == -1) 
    259249        { 
    260250                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_OPEN, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    261251        } 
    262252 
    263         control.val = 1; 
    264  
    265         if (semctl(keeper, 0, SETVAL, control) == -1) 
     253        semaphore->control.val = 1; 
     254 
     255        if (semctl(semaphore->keeper, 0, SETVAL, semaphore->control) == -1) 
    266256        { 
    267257                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_OPEN, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    268258        } 
    269  
    270 #else 
    271  
    272         key = '/'; 
     259#else 
     260        semaphore->key = '/'; 
    273261 
    274262        if (a_key == 0) 
     
    277265                tools::misc::random(_key, SH_KEY_SIZE / 2 - 1); 
    278266 
    279                 key.append(tools::code::binToHex(dodoString(_key, SH_KEY_SIZE / 2 - 1))); 
     267                semaphore->key.append(tools::code::binToHex(dodoString(_key, SH_KEY_SIZE / 2 - 1))); 
    280268 
    281269                autogenerated = true; 
     
    286274                memcpy(_key, &a_key, 4); 
    287275 
    288                 key.append(tools::code::binToHex(dodoString(_key, 4))); 
    289         } 
    290  
    291         keeper = sem_open(key.c_str(), O_CREAT, S_IRUSR | S_IWUSR, 1); 
    292         if (keeper == SEM_FAILED) 
     276                semaphore->key.append(tools::code::binToHex(dodoString(_key, 4))); 
     277        } 
     278 
     279        semaphore->keeper = sem_open(semaphore->key.c_str(), O_CREAT, S_IRUSR | S_IWUSR, 1); 
     280        if (semaphore->keeper == SEM_FAILED) 
    293281        { 
    294282                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_OPEN, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    295283        } 
    296  
    297284#endif 
    298285} 
     
    304291{ 
    305292#ifdef XSI_IPC 
    306  
    307293        int keeper = semget(a_key, 1, S_IRUSR | S_IWUSR); 
    308294        if (keeper == -1) 
     
    315301                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_REMOVE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    316302        } 
    317  
    318 #else 
    319  
     303#else 
    320304        dodoString key = "/"; 
    321305 
     
    329313                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_REMOVE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    330314        } 
    331  
    332315#endif 
    333316} 
     
    339322{ 
    340323#ifdef XSI_IPC 
    341  
    342         if (keeper == -1) 
     324        if (semaphore->keeper == -1) 
    343325        { 
    344326                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_ACQUIRE, exception::ERRNO_LIBDODO, SECTIONEX_NOTOPENED, PCSYNCPROCESSSECTIONEX_NOTOPENED_STR, __LINE__, __FILE__); 
    345327        } 
    346328 
    347         operations[0].sem_op = -1; 
    348  
    349         if (semop(keeper, operations, 1) != 0) 
     329        semaphore->operations[0].sem_op = -1; 
     330 
     331        if (semop(semaphore->keeper, semaphore->operations, 1) != 0) 
    350332        { 
    351333                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_ACQUIRE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    352334        } 
    353  
    354 #else 
    355  
    356         if (keeper == NULL) 
     335#else 
     336        if (semaphore->keeper == NULL) 
    357337        { 
    358338                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_ACQUIRE, exception::ERRNO_LIBDODO, SECTIONEX_NOTOPENED, PCSYNCPROCESSSECTIONEX_NOTOPENED_STR, __LINE__, __FILE__); 
    359339        } 
    360340 
    361         if (sem_wait(keeper) != 0) 
     341        if (sem_wait(semaphore->keeper) != 0) 
    362342        { 
    363343                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_ACQUIRE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    364344        } 
    365  
    366345#endif 
    367346 
     
    375354{ 
    376355#ifdef XSI_IPC 
    377  
    378         if (keeper == -1) 
     356        if (semaphore->keeper == -1) 
    379357        { 
    380358                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_RELEASE, exception::ERRNO_LIBDODO, SECTIONEX_NOTOPENED, PCSYNCPROCESSSECTIONEX_NOTOPENED_STR, __LINE__, __FILE__); 
    381359        } 
    382360 
    383         operations[0].sem_op = 1; 
    384  
    385         if (semop(keeper, operations, 1) != 0) 
     361        semaphore->operations[0].sem_op = 1; 
     362 
     363        if (semop(semaphore->keeper, semaphore->operations, 1) != 0) 
    386364        { 
    387365                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_RELEASE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    388366        } 
    389  
    390 #else 
    391  
    392         if (keeper == NULL) 
     367#else 
     368 
     369        if (semaphore->keeper == NULL) 
    393370        { 
    394371                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_RELEASE, exception::ERRNO_LIBDODO, SECTIONEX_NOTOPENED, PCSYNCPROCESSSECTIONEX_NOTOPENED_STR, __LINE__, __FILE__); 
    395372        } 
    396373 
    397         if (sem_post(keeper) != 0) 
     374        if (sem_post(semaphore->keeper) != 0) 
    398375        { 
    399376                throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_RELEASE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 
    400377        } 
    401  
    402378#endif 
    403379 
  • trunk/tests/pcprocesscollection_test/test.cc

    r1161 r1187  
    1212#include <libdodo/dataMemoryShared.h> 
    1313#include <libdodo/pcSyncProcessDataSingle.h> 
     14#include <libdodo/pcSyncProcessSection.h> 
    1415#include <libdodo/pcSyncProcessDataCollection.h> 
    1516#include <libdodo/pcSyncProtector.h> 
Note: See TracChangeset for help on using the changeset viewer.