summaryrefslogtreecommitdiff
path: root/sys/src/9/port/allocb.c
AgeCommit message (Collapse)Author
2022-10-21kernel: fix freeb() for custom poolscinap_lenrek
Some ethernet drivers like ethervt6105M maintain a custom pool of Blocks using Block.free callback. To maintain that Block.list pointer is nil when reused, we have to clear it before returning it to the custom pool as the custom pool code is not aware of it. Also, poison Block.list pointer before free().
2018-10-20kernel: fix allocb for BLOCKALIGN*2 >= Hdrspccinap_lenrek
2016-11-05kernel: fix missing ; in panic() callcinap_lenrek
2016-11-05kernel: avoid padblock copying for devtls/devssl/esp, cleanup debuggingcinap_lenrek
to avoid copying in padblock() when adding cryptographics macs to a block in devtls/devssl/esp we reserve 16 extra bytes to the allocation. remove qio ixsummary() function and add acid function qiostats() to /sys/lib/acid/kernel simplify iallocb(), remove iallocsummary() statitics.
2015-11-30kernel: cleanup exit()/shutdown()/reboot() codecinap_lenrek
introduce cpushutdown() function that does the common operation of initiating shutdown, returning once all cpu's got the message and are about to shutdown. this avoids duplicated code which isnt really machine specific. automatic reboot on panic only when *debug= is not set and the machine is a cpu server or has no display, otherwise just hang.
2014-12-16kernel: replace ulong with uintptr in ucallocb() and fix unneeded parenthesescinap_lenrek
2014-06-08kernel: remove Block refcounting (thanks erik)cinap_lenrek
2014-06-05kernel: dont use atomic increment for Proc.nlocks, maintain Lock.m for ↵cinap_lenrek
lock(), use uintptr intstead of long for pc values change Proc.nlocks from Ref to int and just use normal increment and decrelemt as done in erik quanstros 9atom. It is not clear why we used atomic increment in the fist place as even if we get preempted by interrupt and scheduled before we write back the incremented value, it shouldnt be a problem and we'll just continue where we left off as our process is the only one that can write to it. Yoann Padioleau found that the Mach pointer Lock.m wasnt maintained consistently for lock() vs canlock() and ilock(). Fixed. Use uintptr instead of ulong for maxlockpc, maxilockpc and ilockpc debug variables.
2014-01-20kernel: apply uintptr for ulong when a pointer is storedcinap_lenrek
this change is in preparation for amd64. the systab calling convention was also changed to return uintptr (as segattach returns a pointer) and the arguments are now passed as va_list which handles amd64 arguments properly (all arguments are passed in 64bit quantities on the stack, tho the upper part will not be initialized when the element is smaller than 8 bytes). this is partial. xalloc needs to be converted in the future.
2013-05-21kernel: make allocb() wait instead of panic() when possiblecinap_lenrek
as long as our process doesnt hold any locks or ilocks, we can try to wait for the memory to become available instead of panicing.
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen