Changeset cd97caaaf4a03ed9c491c6c973b956ec045fc20e

Show
Ignore:
Timestamp:
05/26/10 01:20:43 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1274836843 +0000
git-parent:

[1e6900531e40e5dcc43290530d5fe4d2989a4d30]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1274836843 +0000
Message:

We don't need to know which is the 'master thread' refs #283

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/eventer/eventer_epoll_impl.c

    r8fa2f74 rcd97caa  
    5353#include "eventer/eventer_impl_private.h" 
    5454 
    55 static pthread_t master_thread; 
    5655static int *masks; 
    5756static int epoll_fd = -1; 
     
    6463  if((rv = eventer_impl_init()) != 0) return rv; 
    6564 
    66   master_thread = pthread_self(); 
    6765  signal(SIGPIPE, SIG_IGN); 
    6866  epoll_fd = epoll_create(1024); 
     
    222220} 
    223221static int eventer_epoll_impl_loop() { 
    224   int is_master_thread = 0; 
    225222  struct epoll_event *epev; 
    226   pthread_t self; 
    227  
    228   self = pthread_self(); 
    229   if(pthread_equal(self, master_thread)) is_master_thread = 1; 
    230223 
    231224  epev = malloc(sizeof(*epev) * maxfds); 
  • src/eventer/eventer_kqueue_impl.c

    r654c8eb rcd97caa  
    5454 
    5555static const struct timeval __dyna_increment = { 0, 1000 }; /* 1 ms */ 
    56 static pthread_t master_thread; 
    5756static int kqueue_fd = -1; 
    5857typedef struct kqueue_setup { 
     
    111110  if((rv = eventer_impl_init()) != 0) return rv; 
    112111 
    113   master_thread = pthread_self(); 
    114112  signal(SIGPIPE, SIG_IGN); 
    115113  kqueue_fd = kqueue(); 
     
    316314} 
    317315static int eventer_kqueue_impl_loop() { 
    318   int is_master_thread = 0; 
    319316  struct timeval __dyna_sleep = { 0, 0 }; 
    320   pthread_t self; 
    321317  KQUEUE_DECL; 
    322318  KQUEUE_SETUP; 
    323  
    324   self = pthread_self(); 
    325   if(pthread_equal(self, master_thread)) is_master_thread = 1; 
    326319 
    327320  if(!kqs) { 
  • src/eventer/eventer_ports_impl.c

    r33a8e3d rcd97caa  
    5757 
    5858static const struct timeval __dyna_increment = { 0, 1000 }; /* 1 ms */ 
    59 static pthread_t master_thread; 
    6059static int port_fd = -1; 
    6160 
     
    6766  if((rv = eventer_impl_init()) != 0) return rv; 
    6867 
    69   master_thread = pthread_self(); 
    7068  signal(SIGPIPE, SIG_IGN); 
    7169  port_fd = port_create(); 
     
    244242static int eventer_ports_impl_loop() { 
    245243  struct timeval __dyna_sleep = { 0, 0 }; 
    246   int is_master_thread = 0; 
    247   pthread_t self; 
    248  
    249   self = pthread_self(); 
    250   if(pthread_equal(self, master_thread)) is_master_thread = 1; 
    251244 
    252245  while(1) {