plan9port/src/lib9
Dan Cross 7bf2db4c2a malloc: remove locking
The issue manifests in fork: POSIX fork mandates that a
fork'd process is created with a single thread.  If a
multithreaded program forks, and some thread was in
malloc() when the fork() happened, then in the child
the lock will be held but there will be no thread to
release it.

We assume the system malloc() must already know how to
deal with this and is thread-safe, but it won't know about
our custom spinlock.  Judging that this is no longer
necessary (the lock code was added 15 years ago) we remove
it.

Signed-off-by: Dan Cross <cross@gajendra.net>
2020-01-16 16:54:19 +00:00
..
fmt lib9: make formatting lock-free again 2020-01-14 18:04:00 -05:00
utf Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
_exits.c add exitcode 2006-02-12 19:40:55 +00:00
_p9dialparse.c all: fix or silence various gcc warnings 2020-01-12 15:07:42 -05:00
_p9dir.c lib9: do not fetch disk size for character devices 2020-01-13 19:30:02 -05:00
announce.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
argv0.c Various tweaks to make things run on Mac OS. 2003-10-01 02:50:57 +00:00
atexit.c add exitcode 2006-02-12 19:40:55 +00:00
atnotify.c Various additions and fixes. 2003-11-23 18:12:54 +00:00
atoi.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
atol.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
atoll.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
await.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
cistrcmp.c Various additions and fixes. 2003-11-23 18:12:54 +00:00
cistrncmp.c Various additions and fixes. 2003-11-23 18:12:54 +00:00
cistrstr.c Various additions and fixes. 2003-11-23 18:12:54 +00:00
cleanname.c Single-threaded plumber that can run "start" rules. 2003-10-14 02:35:00 +00:00
convD2M.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
convM2D.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
convM2S.c delete 9P2000.u 2010-12-07 13:34:11 -05:00
convS2M.c delete 9P2000.u 2010-12-07 13:34:11 -05:00
create.c better error message 2005-03-18 19:03:45 +00:00
crypt.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
ctime.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
debugmalloc.c malloc: remove locking 2020-01-16 16:54:19 +00:00
dial.c lib9: fix memory leak in dial of regular file (#284) 2020-01-13 11:38:17 -05:00
dirfstat.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
dirfwstat.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
dirmodefmt.c better symlink 2005-02-21 14:25:12 +00:00
dirread.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
dirstat.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
dirwstat.c lib9/dirwstat: missing prototype for chmod 2008-12-07 09:20:08 -08:00
dup.c Various additions and fixes. 2003-11-23 18:12:54 +00:00
encodefmt.c Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
errstr.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
exec.c Various additions and fixes. 2003-11-23 18:12:54 +00:00
execl.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
exitcode.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
fcallfmt.c 9P2000.u fixes (Lucho Ionkov) 2005-11-21 20:42:52 +00:00
fmtlock2.c lib9: make formatting lock-free again 2020-01-14 18:04:00 -05:00
fork.c Continue the pthreads torture. 2004-09-21 01:11:28 +00:00
frand.c lib9: import frand function from Plan 9 2017-09-01 22:51:14 +02:00
frexp.c lib9: make a p9frexp function wrapping system frexp 2020-01-12 15:07:42 -05:00
get9root.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
getcallerpc.c lib9: add getcallerpc.c (fixes build) 2020-01-08 22:27:51 -05:00
getenv.c lib9: putenv wraps POSIX setenv, not legacy putenv 2020-01-16 16:46:58 +00:00
getfields.c Initial revision 2003-09-30 17:47:41 +00:00
getnetconn.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
getns.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
getuser.c Today's changes. 2004-03-25 23:03:57 +00:00
getwd.c Various additions and fixes. 2003-11-23 18:12:54 +00:00
jmp.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
LICENSE more licensing 2009-08-14 22:49:38 -07:00
lnrand.c Add some missing files. 2004-03-21 14:05:38 +00:00
lock.c Rewrite to remove dependence on rendezvous and its bizarre 2004-09-17 00:38:29 +00:00
lrand.c all: fix or silence various gcc warnings 2020-01-12 15:07:42 -05:00
main.c Get rid of 9proc. 2004-09-23 03:06:04 +00:00
malloc.c malloc: remove locking 2020-01-16 16:54:19 +00:00
malloctag.c Initial revision 2003-09-30 17:47:41 +00:00
mallocz.c Today's changes. 2004-03-25 23:03:57 +00:00
mkfile lib9: make a p9frexp function wrapping system frexp 2020-01-12 15:07:42 -05:00
nan.c Fighting the good fight. 2004-02-29 22:10:26 +00:00
needsrcquote.c lib9: fix needsrcquote 2017-06-19 13:51:23 +00:00
needstack.c just a stub. 2004-04-21 22:44:51 +00:00
netcrypt.c hard code list of plan 9 services in case they are not in /etc/services 2005-02-11 16:58:23 +00:00
netmkaddr.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
notify.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
nrand.c Initial revision 2003-09-30 17:47:41 +00:00
nulldir.c lib9: null d->ext during nulldir 2008-10-26 17:03:17 -04:00
open.c better error message 2005-03-18 19:03:45 +00:00
opentemp.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
pin.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
pipe.c Small tweaks 2004-03-21 04:33:13 +00:00
portdate plan 9 changes 2004-12-26 23:17:03 +00:00
post9p.c post9p: try mount9p before 9pfuse 2008-06-19 19:13:47 -04:00
postnote.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
priv.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
qlock.c sunos fixes 2005-01-07 07:47:37 +00:00
quote.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
rand.c Avoid conflicts with stdlib. 2004-12-29 01:30:19 +00:00
read9pmsg.c File system stuff. 2003-12-06 18:08:52 +00:00
readcons.c hard code list of plan 9 services in case they are not in /etc/services 2005-02-11 16:58:23 +00:00
readn.c Initial revision 2003-09-30 17:47:41 +00:00
rfork.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
searchpath.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
seek.c Various additions and fixes. 2003-11-23 18:12:54 +00:00
sendfd.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
sleep.c fix sleep for OpenBSD 4.0 (Tim Wiess) 2006-11-02 17:31:30 +00:00
strdup.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
strecpy.c Initial revision 2003-09-30 17:47:41 +00:00
sysfatal.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
syslog.c hard code list of plan 9 services in case they are not in /etc/services 2005-02-11 16:58:23 +00:00
sysname.c cache answer 2005-01-04 22:19:25 +00:00
test.c Initial revision 2003-09-30 17:47:41 +00:00
testfltfmt.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
testfmt.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
testfork.c Initial revision 2003-09-30 17:47:41 +00:00
testprint.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
time.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
tm2sec.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
tokenize.c Initial revision 2003-09-30 17:47:41 +00:00
truerand.c fix type-punned pointer warnings from gcc 2010-03-10 14:50:33 -08:00
u16.c Initial revision 2003-09-30 17:47:41 +00:00
u32.c Initial revision 2003-09-30 17:47:41 +00:00
u64.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
udp.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
unsharp.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
wait.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
waitpid.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
write.c lib9: add write function that withstands interrupts 2008-07-04 12:38:26 -04:00
zoneinfo.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
zoneinfo.h Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00