summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib/ap/plan9/_buf.c
AgeCommit message (Collapse)Author
2019-06-21Turn on warnings when building libap.Ori Bernstein
For ape, we never enabled warnings in cflags. Turning it on brings up a lot of warnings. Most are noise, but a few caught unused variables and trunctaions of pointers. to smaller integers (int, long). A few warnings remain.
2013-05-11ape: change types from unsigned long to void* for rendezvous() and ↵cinap_lenrek
segattach()/segbrk() (erik), use uniqueue rendezvous tags for _buf and listen
2013-05-06ape: remove unused variablesppatience0
2013-05-03ape: get rid of fixed MUXADDR for buffered i/ocinap_lenrek
instead of trying to resize the segment (which will not work when the kernel picks the address as it will allocate right before the base of the topmost segment), we create the mux segment with the maximum size needed (arround 1.4MB) for OPEN_MAX filedescriptors. buf slots will be reused and slots get demand paged once used.
2013-05-03ape: remove unused variables from _buf (from erik qunastros _bufupd patch)cinap_lenrek
2013-03-11ape: fix thread race with close() and select()cinap_lenrek
in ape close(), do the real filedescriptor _CLOSE() *after* we cleared the _fdinfo[] slot because once closed, we dont own the slot anymore and another process doing open() can trash the slot. make sure open() retuns fd < OPEN_MAX. double check in _startbuf() holding mux->lock if the fd is already buffered preveting running double copyprocs on a fd. dont zero the mux->rwant/ewant bitmaps at the end of select() as we do not hold the mix->lock. in _closebuf() kill copyproc while holding the mux->lock to make sure the copyproc isnt holding it at the time it is killed. run kill() multiple times to make sure the proc is gone.
2013-03-10ape: check for invalid filedescriptors in select()cinap_lenrek
2012-07-30import updated compilers from sourcescinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen