This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
RE: How is _GLOBAL_REENT meant to be used?
- From: "Thomas Zenker" <thz at isepos dot de>
- To: "Schwarz, Konrad" <konrad dot schwarz at siemens dot com>
- Cc: <newlib at sourceware dot org>
- Date: Mon, 24 Apr 2006 12:08:28 +0200
- Subject: RE: How is _GLOBAL_REENT meant to be used?
Am 24 Apr 2006 um 11:24 hat Schwarz, Konrad geschrieben:
> > -----Original Message-----
> > From: newlib-owner@sourceware.org
> > Ok, but what if you do not use newlib for threads within a
> > process (f.e. under linux), but as independent tasks in a
> > RTOS, then you want to keep the information about open files
> > separate for each task.
>
> You don't want to do this in modern systems :-).
>
> The approach of emulating e.g., Unix processes as RTOS ``tasks'' dates
> to before the time that Unix supported threads. With the advent of
> pthreads, it is much better to map RTOS ``tasks'' to Pthread
> ``threads''. E.g., this mapping acknowledges the fact that all memory
> is shared.
I don't want to emulate UNIX processes with all semantics but some. So to have libc
separate for each task and cleanup on exit. pthread_exit doesn't do anything.