summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9dd6399)
these should be tweaked according to testing. offhand i know 1000 is
too low and 5000 is likely to be sufficiently high. consider trying to
add futexes to file locking, too...
void __lockfile(FILE *f)
{
void __lockfile(FILE *f)
{
int tid;
if (f->lock < 0) return;
int tid;
if (f->lock < 0) return;
void __wait(volatile int *addr, volatile int *waiters, int val, int priv)
{
void __wait(volatile int *addr, volatile int *waiters, int val, int priv)
{
if (priv) priv = 128; priv=0;
while (spins--) {
if (*addr==val) a_spin();
if (priv) priv = 128; priv=0;
while (spins--) {
if (*addr==val) a_spin();