Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

atomic_dec_uint, atomic_add_int ok for signed integers?



Hi!

I'm still trying to find a reason for the

kernel diagnostic assertion "uvmexp.swpgonly < uvmexp.swpginuse" failed: file "/usr/src/sys/uvm/uvm_pdaemon.c", line 795

panics I see too often. I'm now wondering if the functions

       void atomic_dec_uint(volatile unsigned int *ptr);
       void atomic_add_int(volatile unsigned int *ptr, int delta);

are safe to use on a variable

       int swpgonly;

i.e. a signed integer, even though they are defined for unsigned int*?
 Thomas


Home | Main Index | Thread Index | Old Index