syscall_emul.hh (13649:d1bb2eb7d0f6) | syscall_emul.hh (13650:93efc0143eb7) |
---|---|
1/* 2 * Copyright (c) 2012-2013, 2015 ARM Limited 3 * Copyright (c) 2015 Advanced Micro Devices, Inc. 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 427 unchanged lines hidden (view full) --- 436 futex_map.suspend_bitset(uaddr, process->tgid(), tc, val3); 437 } 438 439 return 0; 440 } else if (OS::TGT_FUTEX_WAKE == op) { 441 return futex_map.wakeup(uaddr, process->tgid(), val); 442 } else if (OS::TGT_FUTEX_WAKE_BITSET == op) { 443 return futex_map.wakeup_bitset(uaddr, process->tgid(), val3); | 1/* 2 * Copyright (c) 2012-2013, 2015 ARM Limited 3 * Copyright (c) 2015 Advanced Micro Devices, Inc. 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 427 unchanged lines hidden (view full) --- 436 futex_map.suspend_bitset(uaddr, process->tgid(), tc, val3); 437 } 438 439 return 0; 440 } else if (OS::TGT_FUTEX_WAKE == op) { 441 return futex_map.wakeup(uaddr, process->tgid(), val); 442 } else if (OS::TGT_FUTEX_WAKE_BITSET == op) { 443 return futex_map.wakeup_bitset(uaddr, process->tgid(), val3); |
444 } | 444 } else if (OS::TGT_FUTEX_REQUEUE == op || 445 OS::TGT_FUTEX_CMP_REQUEUE == op) { |
445 | 446 |
447 // Ensure futex system call accessed atomically. 448 BufferArg buf(uaddr, sizeof(int)); 449 buf.copyIn(tc->getMemProxy()); 450 int mem_val = *(int*)buf.bufferPtr(); 451 /* 452 * For CMP_REQUEUE, the whole operation is only started only if 453 * val3 is still the value of the futex pointed to by uaddr. 454 */ 455 if (OS::TGT_FUTEX_CMP_REQUEUE && val3 != mem_val) 456 return -OS::TGT_EWOULDBLOCK; 457 return futex_map.requeue(uaddr, process->tgid(), val, timeout, uaddr2); 458 } |
|
446 warn("futex: op %d not implemented; ignoring.", op); 447 return -ENOSYS; 448} 449 450 451/// Pseudo Funcs - These functions use a different return convension, 452/// returning a second value in a register other than the normal return register 453SyscallReturn pipePseudoFunc(SyscallDesc *desc, int num, --- 2240 unchanged lines hidden --- | 459 warn("futex: op %d not implemented; ignoring.", op); 460 return -ENOSYS; 461} 462 463 464/// Pseudo Funcs - These functions use a different return convension, 465/// returning a second value in a register other than the normal return register 466SyscallReturn pipePseudoFunc(SyscallDesc *desc, int num, --- 2240 unchanged lines hidden --- |