comparison src/thread/linux/SDL_systhread.c @ 1300:fd068ab116ee

Removed some old Mac OS X cruft. Fixes Bugzilla #64. --ryan.
author Ryan C. Gordon <icculus@icculus.org>
date Mon, 30 Jan 2006 18:56:30 +0000
parents b8d311d90021
children c9b51268668f
comparison
equal deleted inserted replaced
1299:2bf9dda618e5 1300:fd068ab116ee
59 59
60 #else 60 #else
61 61
62 #include <signal.h> 62 #include <signal.h>
63 63
64 #if !defined(MACOSX) /* pthread_sigmask seems to be missing on MacOS X? */
65 /* List of signals to mask in the subthreads */ 64 /* List of signals to mask in the subthreads */
66 static int sig_list[] = { 65 static int sig_list[] = {
67 SIGHUP, SIGINT, SIGQUIT, SIGPIPE, SIGALRM, SIGTERM, SIGCHLD, SIGWINCH, 66 SIGHUP, SIGINT, SIGQUIT, SIGPIPE, SIGALRM, SIGTERM, SIGCHLD, SIGWINCH,
68 SIGVTALRM, SIGPROF, 0 67 SIGVTALRM, SIGPROF, 0
69 }; 68 };
70 #endif /* !MACOSX */
71 69
72 #ifdef SDL_USE_PTHREADS 70 #ifdef SDL_USE_PTHREADS
73 71
74 #include <pthread.h> 72 #include <pthread.h>
75 73
100 return(0); 98 return(0);
101 } 99 }
102 100
103 void SDL_SYS_SetupThread(void) 101 void SDL_SYS_SetupThread(void)
104 { 102 {
105 #if !defined(MACOSX) /* pthread_sigmask seems to be missing on MacOS X? */
106 int i; 103 int i;
107 sigset_t mask; 104 sigset_t mask;
108 105
109 /* Mask asynchronous signals for this thread */ 106 /* Mask asynchronous signals for this thread */
110 sigemptyset(&mask); 107 sigemptyset(&mask);
111 for ( i=0; sig_list[i]; ++i ) { 108 for ( i=0; sig_list[i]; ++i ) {
112 sigaddset(&mask, sig_list[i]); 109 sigaddset(&mask, sig_list[i]);
113 } 110 }
114 pthread_sigmask(SIG_BLOCK, &mask, 0); 111 pthread_sigmask(SIG_BLOCK, &mask, 0);
115 #endif /* !MACOSX */
116 112
117 #ifdef PTHREAD_CANCEL_ASYNCHRONOUS 113 #ifdef PTHREAD_CANCEL_ASYNCHRONOUS
118 /* Allow ourselves to be asynchronously cancelled */ 114 /* Allow ourselves to be asynchronously cancelled */
119 { int oldstate; 115 { int oldstate;
120 pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldstate); 116 pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldstate);