Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Mar 2002 09:34:37 -0800 (PST)
From:      Tor Egge <tegge@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/lib/libc/stdlib atexit.c
Message-ID:  <200203051734.g25HYbZ13632@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
tegge       2002/03/05 09:34:37 PST

  Modified files:
    lib/libc/stdlib      atexit.c 
  Log:
  When multiple threads call atexit at the same time, some operations must
  be serialized.  A mutex is used to protect the critical regions.
  
  sbrk() and brk() are not thread safe.  Replace use of sbrk() with
  a call to malloc to avoid race when one thread calls atexit
  while another thread calls malloc.
  
  Reviewed by:    deischen
  
  Revision  Changes    Path
  1.4       +28 -2     src/lib/libc/stdlib/atexit.c

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203051734.g25HYbZ13632>