Changeset 3105
- Timestamp:
- 03/05/10 12:59:21 (6 months ago)
- Location:
- libburn/trunk
- Files:
-
- 2 modified
-
cdrskin/cdrskin_timestamp.h (modified) (1 diff)
-
libburn/async.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libburn/trunk/cdrskin/cdrskin_timestamp.h
r3104 r3105 1 #define Cdrskin_timestamP "2010.03.05.1 11712"1 #define Cdrskin_timestamP "2010.03.05.190110" -
libburn/trunk/libburn/async.c
r3102 r3105 319 319 static void *erase_worker_func(struct w_list *w) 320 320 { 321 322 #define Libburn_protect_erase_threaD 1 323 324 #ifdef Libburn_protect_erase_threaD 325 sigset_t sigset, oldset; 326 327 /* Protect blank thread from being interrupted by external signals */ 328 sigfillset(&sigset); 329 sigdelset(&sigset, SIGSEGV); 330 sigdelset(&sigset, SIGILL); 331 pthread_sigmask(SIG_SETMASK, &sigset, &oldset); 332 #endif /* Libburn_protect_erase_threaD */ 333 321 334 burn_disc_erase_sync(w->u.erase.drive, w->u.erase.fast); 322 335 remove_worker(pthread_self()); 336 337 #ifdef Libburn_protect_erase_threaD 338 /* (just in case it would not end with all signals blocked) */ 339 pthread_sigmask(SIG_SETMASK, &oldset, NULL); 340 #endif /* Libburn_protect_erase_threaD */ 341 323 342 return NULL; 324 343 } … … 391 410 static void *format_worker_func(struct w_list *w) 392 411 { 412 413 #define Libburn_protect_format_threaD 1 414 415 #ifdef Libburn_protect_format_threaD 416 sigset_t sigset, oldset; 417 418 /* Protect format thread from being interrupted by external signals */ 419 sigfillset(&sigset); 420 sigdelset(&sigset, SIGSEGV); 421 sigdelset(&sigset, SIGILL); 422 pthread_sigmask(SIG_SETMASK, &sigset, &oldset); 423 #endif /* Libburn_protect_format_threaD */ 424 393 425 burn_disc_format_sync(w->u.format.drive, w->u.format.size, 394 426 w->u.format.flag); 395 427 remove_worker(pthread_self()); 428 429 #ifdef Libburn_protect_format_threaD 430 /* (just in case it would not end with all signals blocked) */ 431 pthread_sigmask(SIG_SETMASK, &oldset, NULL); 432 #endif /* Libburn_protect_format_threaD */ 433 396 434 return NULL; 397 435 } … … 566 604 msg, 0, 0); 567 605 606 remove_worker(pthread_self()); 607 d->busy = BURN_DRIVE_IDLE; 608 568 609 #ifdef Libburn_protect_write_threaD 569 610 /* (just in case it would not end with all signals blocked) */ … … 571 612 #endif /* Libburn_protect_write_threaD */ 572 613 573 remove_worker(pthread_self());574 d->busy = BURN_DRIVE_IDLE;575 614 return NULL; 576 615 } … … 665 704 int old; 666 705 667 pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old);668 pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &old);669 /* Note: Only burn_fifo_abort() shall cancel the fifo thread */670 671 burn_fifo_source_shoveller(w->u.fifo.source, w->u.fifo.flag);672 remove_worker(pthread_self());673 return NULL;674 }675 676 677 int burn_fifo_start(struct burn_source *source, int flag)678 {679 struct fifo_opts o;680 struct burn_source_fifo *fs = source->data;681 682 706 #define Libburn_protect_fifo_threaD 1 683 707 … … 685 709 sigset_t sigset, oldset; 686 710 687 /* Protect writethread from being interrupted by external signals */711 /* Protect fifo thread from being interrupted by external signals */ 688 712 sigfillset(&sigset); 689 713 sigdelset(&sigset, SIGSEGV); … … 691 715 pthread_sigmask(SIG_SETMASK, &sigset, &oldset); 692 716 #endif /* Libburn_protect_fifo_threaD */ 717 718 pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old); 719 pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &old); 720 /* Note: Only burn_fifo_abort() shall cancel the fifo thread */ 721 722 burn_fifo_source_shoveller(w->u.fifo.source, w->u.fifo.flag); 723 remove_worker(pthread_self()); 724 725 #ifdef Libburn_protect_fifo_threaD 726 /* (just in case it would not end with all signals blocked) */ 727 pthread_sigmask(SIG_SETMASK, &oldset, NULL); 728 #endif /* Libburn_protect_fifo_threaD */ 729 730 return NULL; 731 } 732 733 734 int burn_fifo_start(struct burn_source *source, int flag) 735 { 736 struct fifo_opts o; 737 struct burn_source_fifo *fs = source->data; 693 738 694 739 fs->is_started = -1; … … 708 753 fs->is_started = 1; 709 754 710 #ifdef Libburn_protect_fifo_threaD711 /* (just in case it would not end with all signals blocked) */712 pthread_sigmask(SIG_SETMASK, &oldset, NULL);713 #endif /* Libburn_protect_fifo_threaD */714 715 755 return 1; 716 756 }
