Re: thread support

1997-06-15 Thread Bruce Perens
From: Andy Mortimer <[EMAIL PROTECTED]> > Although how well this interacts with dynamically-loaded shared libraries > is anyone's guess Your process gets its own copy of the library data that it can share with all of its threads but not with unrelated processes. Thus, the fact that the library is

Re: thread support

1997-06-14 Thread Rob Browning
Andy Mortimer <[EMAIL PROTECTED]> writes: > the basic question I want to answer is: if I open a library in one > thread, is it then always accessible to all threads (presumably), > and what happens to any global variables in that library? Threading shoudln't have any affect on this. All the thre

Re: thread support

1997-06-14 Thread Andy Mortimer
On Jun 14, Rob Browning wrote > > Andy Mortimer <[EMAIL PROTECTED]> writes: > > > Although how well this interacts with dynamically-loaded shared libraries > > is anyone's guess; > > What do you mean? I'm using libdl, to allow me to dynamically add and remove modules as I go. But I don't really

Re: thread support

1997-06-14 Thread Rob Browning
Andy Mortimer <[EMAIL PROTECTED]> writes: > Although how well this interacts with dynamically-loaded shared libraries > is anyone's guess; What do you mean? > I suspect I may have to go the global-variable route myself, which > is why I was asking for examples/docs. Bruce is right that in gener

Re: thread support

1997-06-14 Thread Rob Browning
Guenter Geiger <[EMAIL PROTECTED]> writes: > Yes, I've tried - that's how I came to this topic. > The problem is with the global errno variable. As Xlib does a lot of > error checking using errno. After X encounters an error it checks what > kind of error ocurred with errno and deals with it. > I

Re: thread support

1997-06-14 Thread Rob Browning
Mark Eichin <[EMAIL PROTECTED]> writes: > debian's Xfree86 3.2 packages were not built reentrant. I'm working > on the 3.3 libraries now, and once they're stable and working, I'll > be adding other support to them. (have you ever tried programming > with X and threads? you probably want to onl

Re: thread support

1997-06-14 Thread Rob Browning
Douglas L Stewart <[EMAIL PROTECTED]> writes: > It's just a matter of making sure all of the other libraries get thread > safe, which will get partially done I'm sure. The ones that aren't, you > can work around it by just using them in a single thread usually. or often by just using a mutex to

Re: thread support

1997-06-14 Thread Rob Browning
Guenter Geiger <[EMAIL PROTECTED]> writes: > - libraries should be compiled reentrant This has been on the list of things to do (for bo and now for hamm) for a while. It'll propagate eventually. Note that just compiling with -D_REENTRANT doesn't mean that the library is suddenly multi-thread s

Re: thread support

1997-06-14 Thread Andy Mortimer
On Jun 13, Bruce Perens wrote > Regarding how to make your library re-entrant, you must have no global or > static variables that are not protected by mutexes. In general it is easy > to deal with this by passing your state structure as a pointer argument to > all of your functions rather than by u

Re: thread support

1997-06-14 Thread Philippe Troin
On Fri, 13 Jun 1997 11:11:18 GMT Guenter Geiger ([EMAIL PROTECTED] ) wrote: > Will there be kernel level thread support for Debian ? Yes ! > The Linuxthreads package from Xavier Leroy is a very good Thread > Library supporting Posix threads. In order to develop threaded > applic

Re: thread support

1997-06-14 Thread Guenter Geiger
Philippe Troin writes: > They're probably in libpthread0-dev ! Sorry, I'm feeling rather guilty .. > > > - libraries should be compiled reentrant > > Most of them are. I'm not sure about the X libraries. > Does anybody know about the X libraries ? The linuxthreads-0.6 provide a patch

Re: thread support

1997-06-14 Thread Douglas L Stewart
On Fri, 13 Jun 1997, Guenter Geiger wrote: > I am rather new to this list, so excuse me if this question has > already been dealt with. > > > Will there be kernel level thread support for Debian ? > > The Linuxthreads package from Xavier Leroy is a very good Thread >

Re: thread support

1997-06-14 Thread Guenter Geiger
Mark Eichin writes: > be adding other support to them. (have you ever tried programming > with X and threads? you probably want to only use Display* per-thread > anyhow...) Yes, I've tried - that's how I came to this topic. The problem is with the global errno variable. As Xlib does a lot of

Re: thread support

1997-06-14 Thread Helmut Geyer
Guenter Geiger <[EMAIL PROTECTED]> writes: > I am rather new to this list, so excuse me if this question has > already been dealt with. > > > Will there be kernel level thread support for Debian ? > > The Linuxthreads package from Xavier Leroy is a very good Thread

thread support

1997-06-14 Thread Guenter Geiger
I am rather new to this list, so excuse me if this question has already been dealt with. Will there be kernel level thread support for Debian ? The Linuxthreads package from Xavier Leroy is a very good Thread Library supporting Posix threads. In order to develop threaded applications there

Re: thread support

1997-06-14 Thread Mark Eichin
debian's Xfree86 3.2 packages were not built reentrant. I'm working on the 3.3 libraries now, and once they're stable and working, I'll be adding other support to them. (have you ever tried programming with X and threads? you probably want to only use Display* per-thread anyhow...)

Re: thread support

1997-06-14 Thread Andy Mortimer
On Jun 13, Helmut Geyer wrote > Our aim for Debian 2.0 is to provide all libs as reentrant. It usually > isn't enough just to compile it with -D_REENTRANT. You have to avoid > static and global variables and do some mutex locking. Can anybody point me to some more information about this? If I'm go

Re: thread support

1997-06-14 Thread Bruce Perens
Regarding how to make your library re-entrant, you must have no global or static variables that are not protected by mutexes. In general it is easy to deal with this by passing your state structure as a pointer argument to all of your functions rather than by using a global variable. I don't know w