Branch: Tag:

1999-03-11

1999-03-11 23:03:31 by Martin Stjernholm <mast@lysator.liu.se>

Actually use the thread code.

Rev: server/modules/graphics/graphic_text.pike:1.157

1: - constant cvs_version="$Id: graphic_text.pike,v 1.156 1999/02/12 00:52:06 grubba Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.157 1999/03/11 23:03:31 mast Exp $";   constant thread_safe=1;    -  + #include <config.h>   #include <module.h>   #include <stat.h>   inherit "module";
722:   int number=0;      #ifdef THREADS - object number_lock = Threads.Mutex(); + object number_lock = Thread.Mutex();   #define NUMBER_LOCK() do { object __key = number_lock->lock()   #define NUMBER_UNLOCK() if (__key) destruct(__key); } while(0)   #else /* !THREADS */
1168:    if(res = cached_args[ q ])    return res;    +  int n;    NUMBER_LOCK();    cached_args[ number ] = f2;    cached_args[ q ] = number; -  int n = number++; +  n = number++;    NUMBER_UNLOCK();       remove_call_out(save_cached_args);