[BACK]Return to atomic.h CVS log [TXT][DIR] Up to [local] / sys / arch / vax / include

Annotation of sys/arch/vax/include/atomic.h, Revision 1.1.1.1

1.1       nbrk        1: /*     $OpenBSD: atomic.h,v 1.3 2007/04/05 17:33:50 miod Exp $ */
                      2:
                      3: /* Public Domain */
                      4:
                      5: #ifndef __VAX_ATOMIC_H__
                      6: #define __VAX_ATOMIC_H__
                      7:
                      8: #if defined(_KERNEL)
                      9:
                     10: #include <machine/mtpr.h>
                     11:
                     12: static __inline void
                     13: atomic_setbits_int(__volatile unsigned int *uip, unsigned int v)
                     14: {
                     15:        int s;
                     16:
                     17:        s = splhigh();
                     18:        *uip |= v;
                     19:        splx(s);
                     20: }
                     21:
                     22: static __inline void
                     23: atomic_clearbits_int(__volatile unsigned int *uip, unsigned int v)
                     24: {
                     25:        int s;
                     26:
                     27:        s = splhigh();
                     28:        *uip &= ~v;
                     29:        splx(s);
                     30: }
                     31:
                     32: #endif /* defined(_KERNEL) */
                     33: #endif /* __VAX_ATOMIC_H__ */

CVSweb