summaryrefslogtreecommitdiff
path: root/sys/src/9/port/taslock.c
AgeCommit message (Collapse)Author
2023-04-08kernel: Clear secrets on rebootcinap_lenrek
The idea is that when we reboot, we zero out memory written by processes that have the private flag set (such as factotum and keyfs), and also clear the secrmem pool, which contains TLS keys and the state of the random number generator. This is so the newly booted kernel or firmware will not find these secret keys in memory.
2019-05-01kernel: include lock pointer in error report, stop spamming lockloop prints ↵cinap_lenrek
when we are panicing
2015-06-18zynq: fix barrierscinap_lenrek
unlock()/iunlock(): we need to place the coherence() *before* "l->key = 0", so that any stores that where done while holding the lock become observable *before* other processors see the lock released. cas()/tas(): place memory barrier before successfull return to prevent reordering.
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.
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen