summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib/ap
AgeCommit message (Collapse)Author
2015-07-07ape: port libc smp tas() for armcinap_lenrek
2015-03-25ape: fix main9 for mipscinap_lenrek
2015-03-25ape: fix lockinit() for mipscinap_lenrek
2015-03-18ape: silence compiler "no return at end of function" for mips lock.ccinap_lenrek
2014-12-25getfcr: change getfcr/setfcr to use VFPcinap_lenrek
2014-12-22ape: add fprint %z format (thanks Ori_B)cinap_lenrek
2014-05-29ape/stdio: set errno to EMFILE when running out of streamscinap_lenrek
2014-02-17prof: properly save and restore RARG for amd64cinap_lenrek
amd64 passes first argument in RARG (BP) register which has the be preserved duing _profin() and _profout() calls. to handle this we introduce _saveret() and _savearg(). _saveret() returns AX, _savearg() returns RARG (BP). for archs other and amd64, _saveret() and _savearg() are the same function, doing nothing. restoing works with dummy function: uintptr _restore(uintptr, uintptr ret) { return ret; } ... ret = _saveret(); arg = _savearg(); ... return _restore(arg, ret); as we pass arg as the first argument, RARG (BP) is restored.
2014-02-01libc and ape support for amd64cinap_lenrek
2014-01-20ape: remove local copy of memccpy()cinap_lenrek
2013-12-28ape: move strdup() from libbsd to libap (from sources)cinap_lenrek
including <string.h> should be enougth to make strdup() available.
2013-11-06synchronize ape's vfprintf with libstdiomischief
in ape's vfprintf we don't check if the file we're writing is actually a string buffer, resulting in a return of -1, when we should actually return the number of bytes that would be written.
2013-10-26mkfiles: do not rely on path containing the . elementcinap_lenrek
when executing generated binaries and helper scripts, always execute them as ./name instead of relying that path contsins the dot.
2013-09-26reverting semaphore lock changes from sources (r41ccd6d221da, rb28756e5ba29)cinap_lenrek
semaphore locks have much higher overhead than initially presented in the "Semaphores in Plan9" paper. until the reason for it has been found out i will revert the changes.
2013-09-21ape: change tas/sleep locks to cas/semacquire/semrelease locks (from sources)cinap_lenrek
2013-06-08ape: fix _main stack setup for arm (_privates and _errnoloc was inside argv)cinap_lenrek
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-06ape: fix uninitialized variable bug in getfields()ppatience0
2013-05-06mergeppatience0
2013-05-06access: unused variableppatience0
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-05-01frexp: handle NaN values (from sources)cinap_lenrek
2013-03-11ape: threadsafe errnocinap_lenrek
store errno on the private process stack so its always per process and not just per memory space. errno itself becomes a macro dereferencing int *_errnoloc; which is initialized from main9.s pointing to the private stack location. various fixes in programs that just imported errno variable with "extern int errno;" instead of including <errno.h>.
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-11ape/malloc: make malloc and free threadsafe for pythoncinap_lenrek
2013-03-11ape/stdio: make fopen() quasi threadsafe for pythoncinap_lenrek
python uses processes sharing memory. it requires at least fopen() to be called by multiple threads at once so we introduce _IO_newfile() which allocates the FILE structure slot under a lock.
2013-03-10ape: check for invalid filedescriptors in select()cinap_lenrek
2013-02-08ape: fix bug in access()ppatience0
2012-12-31fix utf and rune handling in preparation for 32bit runescinap_lenrek
2012-12-03ape: fix memory leak and path limit in unlink()cinap_lenrek
db1 was leaked, and newname could overflow. fixed.
2012-12-03ape: forgot to set errno in access() for dir create failcinap_lenrek
2012-12-03ape: fix _grpmems(), access(), getppid(), cleanupcinap_lenrek
_grpmems() was broken tokenizing group list in place. we have to copy it to status buffer before tokenizing. dynamically alloc path for test file to check write permission on directory and add pid to the name to prevent races. use _OPEN instead of ape open to read /dev/ppid in getppid(). use mode enums instead of numeric constants for _OPEN() and _CREATE().
2012-12-03ape: putenv, add file :)cinap_lenrek
2012-12-03ape: fix putenv()cinap_lenrek
writing /env in putenv() doesnt work. exec will create new enviroment anyway. we have to modify environ array!
2012-12-03ape: fix more bugs, use /env and /proc instead of #e and #p, cleanupcinap_lenrek
remove envname length limitation in _envsetup() by using allocated buffer and use /env instead of #e use /proc and getpid() instead of #p and #c in readprocfdinit() fix buffer overflow in execlp(), check if name of failed exec starts with / . or is \0 make sure not to close our own filedescriptors for FD_CLOEXEC in execve(), fix wrong length check for flushing buffer to /env/_fdinfo. fix error handling cases. copy the enviroment before decoding \1 to \0 because the strings in environ[] array might not be writable. remove bogus close if we fail to open ppid file in getppid() and use /dev/ppid instead of #c/ppid
2012-12-03ape: initialize _tos and use _tos->pid for getpid()cinap_lenrek
2012-12-02ape: fix buffer overflow in _envsetup()cinap_lenrek
2012-08-19calloc: check multiplication overflowcinap_lenrek
2012-07-30import updated compilers from sourcescinap_lenrek
2011-06-04ape: fix symbol name collision for by renaming static timezone struct to tzcinap_lenrek
2011-06-03fixed mktime bugaiju
2011-06-04fixed tzset(), hopefully hg timezone bug should be fixed nowaiju
2011-06-03added (unfinished) nanosleep to APEaiju
2011-05-10ape: fix fread/fwrite, python: disable bytecode dumps, inst: rename textonly ↵cinap_lenrek
to start and remove inst/gui, add sys/lib/rootbind, cisfd(8) manpage
2011-05-09fixed freadaiju
2011-05-09fixed fwrite (hopefully didn't break anything)aiju
2011-05-03ape: fix broken chmod for directories. (makes hg work again)cinap_lenrek
2011-03-30fixing permscinap_lenrek