| futex_atomic_op_inuser (int encoded_op, int __user *uaddr) |
| int op = (encoded_op >> 28) & 7; |
| int cmp = (encoded_op >> 24) & 15; |
| int oparg = (encoded_op << 8) >> 20; |
| int cmparg = (encoded_op << 20) >> 20; |
| if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
| if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) |
| case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; |
| case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; |
| case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; |
| case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; |
| case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; |
| case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; |