[sane-devel] pthread implementation

2009-05-05 Thread m. allan noah
so you've made it unsigned long? what happens in places where the value is set to or checked for -1 (avision.c) ? allan On Tue, May 5, 2009 at 10:09 PM, Michael Cronenworth wrote: > m. allan noah wrote: >> >> yes- it would be nice if SANE_Pid was an opaque type, perhaps just an >> array index or

[sane-devel] pthread implementation

2009-05-05 Thread Michael Cronenworth
m. allan noah wrote: > so you've made it unsigned long? what happens in places where the > value is set to or checked for -1 (avision.c) ? > I had to change those returns and surrounding functions. More work may need to be done.

[sane-devel] pthread implementation

2009-05-05 Thread Michael Cronenworth
m. allan noah wrote: > yes- it would be nice if SANE_Pid was an opaque type, perhaps just an > array index or pointer to a struct. Right now the ranges of valid > values are not the same pthread vs fork. > Actually I changed the typedef in sanei_thread.h from long to type pthread_t and made ot

[sane-devel] pthread implementation

2009-05-05 Thread m. allan noah
yes- it would be nice if SANE_Pid was an opaque type, perhaps just an array index or pointer to a struct. Right now the ranges of valid values are not the same pthread vs fork. allan On Tue, May 5, 2009 at 4:50 PM, Michael Cronenworth wrote: > Hi, > > In sanei/sanei_thread.c there's this little

[sane-devel] pthread implementation

2009-05-05 Thread Michael Cronenworth
Hi, In sanei/sanei_thread.c there's this little tid-bit of code: DBG( 2, "pthread_create() created thread %ld\n", (SANE_Pid)thread ); "thread" is of type pthread_t, which is an extremely opaque type. You won't get a reliable answer by casting it as long and printing it for debugging purposes.