#include <sys/pipe.h>
#include <kern/kern_types.h>
#include <kern/kalloc.h>
+#include <libkern/OSAtomic.h>
struct psemnode;
struct pshmnode;
error = EBADF;
goto outdrop;
}
- p->p_flag |= P_ADVLOCK;
+ OSBitOrAtomic(P_LADVLOCK, &p->p_ladvflag);
error = VNOP_ADVLOCK(vp, (caddr_t)p, F_SETLK, &fl, flg, &context);
(void)vnode_put(vp);
goto outdrop;
error = EBADF;
goto outdrop;
}
- p->p_flag |= P_ADVLOCK;
+ OSBitOrAtomic(P_LADVLOCK, &p->p_ladvflag);
error = VNOP_ADVLOCK(vp, (caddr_t)p, F_SETLK, &fl, flg, &context);
(void)vnode_put(vp);
goto outdrop;
* If the descriptor was in a message, POSIX-style locks
* aren't passed with the descriptor.
*/
- if (p && (p->p_flag & P_ADVLOCK) && fg->fg_type == DTYPE_VNODE) {
+ if (p && (p->p_ladvflag & P_LADVLOCK) && fg->fg_type == DTYPE_VNODE) {
proc_fdunlock(p);
lf.l_whence = SEEK_SET;