Changeset 1186:b298ea2fcaad
- Timestamp:
- 03/20/09 07:58:13 (3 years ago)
- Branch:
- default
- Location:
- trunk/src
- Files:
-
- 2 edited
-
pcSyncProcessDataSingle.cc (modified) (10 diffs)
-
pcSyncProcessSection.cc (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/pcSyncProcessDataSingle.cc
r1162 r1186 74 74 } 75 75 76 control.val = 0;76 control.val = 1; 77 77 78 78 if (semctl(keeper, 0, SETVAL, control) == -1) … … 144 144 if (acquired) 145 145 { 146 operations[0].sem_op = -1;146 operations[0].sem_op = 1; 147 147 148 148 semop(keeper, operations, 1); … … 189 189 if (acquired) 190 190 { 191 operations[0].sem_op = -1;191 operations[0].sem_op = 1; 192 192 193 193 if (semop(keeper, operations, 1) == -1) … … 261 261 } 262 262 263 control.val = 0;263 control.val = 1; 264 264 265 265 if (semctl(keeper, 0, SETVAL, control) == -1) … … 345 345 } 346 346 347 operations[0].sem_op = 0;347 operations[0].sem_op = -1; 348 348 349 349 if (semop(keeper, operations, 1) != 0) … … 352 352 } 353 353 354 data = a_data; 355 354 356 operations[0].sem_op = 1; 355 356 if (semop(keeper, operations, 1) != 0)357 {358 throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_SET, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__);359 }360 361 data = a_data;362 363 operations[0].sem_op = -1;364 357 365 358 if (semop(keeper, operations, 1) != 0) … … 412 405 if (microseconds == 0) 413 406 { 414 operations[0].sem_op = 0; 415 416 if (semop(keeper, operations, 1) != 0) 417 { 418 throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_ACQUIRE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 419 } 420 421 operations[0].sem_op = 1; 407 operations[0].sem_op = -1; 422 408 423 409 if (semop(keeper, operations, 1) != 0) … … 431 417 unsigned long slept = 0; 432 418 433 operations[0].sem_op = 0;419 operations[0].sem_op = -1; 434 420 operations[0].sem_flg = IPC_NOWAIT; 435 421 … … 465 451 locked = false; 466 452 } 467 }468 469 operations[0].sem_op = 1;470 operations[0].sem_flg = 0;471 472 if (semop(keeper, operations, 1) != 0)473 {474 throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSDATASINGLE, SINGLEEX_ACQUIRE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__);475 453 } 476 454 } … … 543 521 } 544 522 545 operations[0].sem_op = -1;523 operations[0].sem_op = 1; 546 524 547 525 if (semop(keeper, operations, 1) != 0) -
trunk/src/pcSyncProcessSection.cc
r1162 r1186 64 64 65 65 operations[0].sem_num = 0; 66 66 67 operations[0].sem_flg = 0; 67 68 … … 72 73 } 73 74 74 control.val = 0;75 control.val = 1; 75 76 76 77 if (semctl(keeper, 0, SETVAL, control) == -1) … … 141 142 if (acquired) 142 143 { 143 operations[0].sem_op = -1;144 operations[0].sem_op = 1; 144 145 145 146 semop(keeper, operations, 1); … … 187 188 if (acquired) 188 189 { 189 operations[0].sem_op = -1;190 operations[0].sem_op = 1; 190 191 191 192 if (semop(keeper, operations, 1) == -1) … … 260 261 } 261 262 262 control.val = 0;263 control.val = 1; 263 264 264 265 if (semctl(keeper, 0, SETVAL, control) == -1) … … 344 345 } 345 346 346 operations[0].sem_op = 0; 347 348 if (semop(keeper, operations, 1) != 0) 349 { 350 throw exception::basic(exception::ERRMODULE_PCSYNCPROCESSSECTION, SECTIONEX_ACQUIRE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 351 } 352 353 operations[0].sem_op = 1; 347 operations[0].sem_op = -1; 354 348 355 349 if (semop(keeper, operations, 1) != 0) … … 387 381 } 388 382 389 operations[0].sem_op = -1;383 operations[0].sem_op = 1; 390 384 391 385 if (semop(keeper, operations, 1) != 0)
Note: See TracChangeset
for help on using the changeset viewer.
