Revision 1218 branches/threaded2merge/src/linad99/thread_stuff.cpp

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

Also available in: Unified diff