Query: ucas
OS: netbsd
Section: 9
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
UCAS(9) BSD Kernel Developer's Manual UCAS(9)NAMEucas -- atomic memory operations on user-space addressSYNOPSIS#include <sys/systm.h> int ucas_ptr(volatile void *uptr, void *old, void *new, void *retp); int ucas_int(volatile int *uptr, int old, int new, int *retp);DESCRIPTIONThese functions provide compare-and-swap (CAS) functionality on user-space address. Except that they can be safely used for the kernel to access user-space address, they are semantically equivalents of atomic_cas(3). uptr The pointer to the variable. This should be a user-space pointer. old The value to compare with the variable. new The value to store to the variable. retp The pointer to the memory to store the old value of the variable.RETURN VALUESOn success, these functions return 0. In that case, the caller can consult the value returned via retp to check the result of the CAS opera- tion. Otherwise, these functions return an appropriate errno(9) error code, typically EFAULT.SEE ALSOatomic_cas(3), intro(9)BUGSConceptually, the retp argument of ucas_ptr() would be of void **. The current prototype is a compromise for usability.BSDOctober 24, 2011 BSD
Related Man Pages |
---|
subyte(9) - freebsd |
store(9) - freebsd |
atomic_cas_32(3) - netbsd |
suword32(9) - freebsd |
suword16(9) - freebsd |
Similar Topics in the Unix Linux Community |
---|
How to compare null and space using single if condition |
Mathomatic 14.2.7 (Default branch) |
Mathomatic 14.3.0 (Default branch) |
Question about Variables in If? |
Printing pointer address |