atomic_dec_uint, atomic_add_int ok for signed integers?

Thomas Klausner <[email protected]>
Newsgroups gmane.os.netbsd.current
Message-ID <bmmlaq5ho5sklyzkc3hmmg4vvmtkp2gmxgf7t7tnxtre2lmjzt@fxcc3xebpu43>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.