lkml.org 
[lkml]   [2006]   [Jan]   [12]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: clone() + glibc thread safe?
FromArjan van de Ven <>
DateThu, 12 Jan 2006 08:28:30 +0100
On Wed, 2006-01-11 at 20:40 -0500, Russell Leighton wrote:
> Can you safely use glibc functions in a thread safe way (e.g., malloc() 
> and friends) from threads generated by:
> 
>      clone(f, stack, CLONE_FS|CLONE_FILES|CLONE_VM, t)

no

unless you tell glibc you're using threads (by using the glibc threading
primitives) glibc doesn't provide such thread safety.
(glibc at runtime knows you have threads and switches to thread-safe
operations)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-12 08:30    [from the cache]
©2003-2008