Revision 1218

branches/threaded2merge/src/linad99/thread_stuff.cpp (revision 1218)
17 17
typedef char * pchar;
18 18
typedef pchar *  ppchar;
19 19
typedef ofstream * pofstream;
20
__ADMBTHREAD__ int adpthread_manager::slave_number;
20
__thread int adpthread_manager::slave_number;
21 21

  
22 22
int adpthread_manager::old_buffer_flag=0;
23 23

  
......
340 340
{
341 341
  if (stransfer_buffer[s1][s2]== 0)
342 342
  {
343
    transfer_buffer[s1][s2]=new char[bs];
344
    scurrent_bptr[s1][s2]=transfer_buffer[s1][s2];
343
    stransfer_buffer[s1][s2]=new char[bs];
344
    scurrent_bptr[s1][s2]=stransfer_buffer[s1][s2];
345 345
    sbuffend[s1][s2]=stransfer_buffer[s1][s2]+bs-1;
346 346
    cout << "Initialized transfer buffer for pair " 
347 347
         << s1 << "  " << s2 << endl;
......
360 360
    ad_exit(1);
361 361
  }
362 362
}
363

  
363 364
void adpthread_manager::check_buffer_size(int nbytes,int s1,int s2)
364 365
{
365 366
  // if the buffer is too small make it bigger and copy old
branches/threaded2merge/src/linad99/adthread.h (revision 1218)
21 21
 // 
22 22
 typedef char * pchar;
23 23
 typedef ofstream * pofstream;
24
 typedef void (*pthreadfun)(void*);
24
 typedef void* (*pthreadfun)(void*);
25 25
 typedef pthreadfun * ppthreadfun;
26 26
 typedef pthread_mutex_t * ppthread_mutex_t;  
27 27
 typedef pthread_cond_t * ppthread_cond_t;
......
52 52
    int num_code;
53 53
    static int old_buffer_flag;
54 54
    int logflag;
55
    static __ADMBTHREAD__ int slave_number;
55
    static __thread int slave_number;
56 56
    adtimer * adt;
57 57
    pofstream * logfiles;
58 58
    ppthreadfun ppf;

Also available in: Unified diff