diff options
author | Rickard Green <[email protected]> | 2013-02-14 17:43:21 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2013-02-14 17:43:21 +0100 |
commit | b708bf2064513e524eec1d5de1a9e76e97a20131 (patch) | |
tree | deb7304828ad2cde93b120bfc866a39b45100768 /erts/emulator/beam/bif.h | |
parent | 85775c504842e669d0bca9c62909366990954ed2 (diff) | |
parent | 953a4bd91e471126370bf5a70956ad233fda189a (diff) | |
download | otp-b708bf2064513e524eec1d5de1a9e76e97a20131.tar.gz otp-b708bf2064513e524eec1d5de1a9e76e97a20131.tar.bz2 otp-b708bf2064513e524eec1d5de1a9e76e97a20131.zip |
Merge branch 'rickard/erl_drv_consume_timeslice/OTP-10810'
* rickard/erl_drv_consume_timeslice/OTP-10810:
Implement erl_drv_consume_timeslice()
Diffstat (limited to 'erts/emulator/beam/bif.h')
-rw-r--r-- | erts/emulator/beam/bif.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/erts/emulator/beam/bif.h b/erts/emulator/beam/bif.h index ceaf747875..51b77a95ed 100644 --- a/erts/emulator/beam/bif.h +++ b/erts/emulator/beam/bif.h @@ -35,6 +35,13 @@ extern Export* erts_format_cpu_topology_trap; #define BIF_ARG_2 (BIF__ARGS[1]) #define BIF_ARG_3 (BIF__ARGS[2]) +#define ERTS_IS_PROC_OUT_OF_REDS(p) \ + ((p)->fcalls > 0 \ + ? 0 \ + : (!ERTS_PROC_GET_SAVED_CALLS_BUF((p)) \ + ? (p)->fcalls == 0 \ + : ((p)->fcalls == -CONTEXT_REDS))) + #define BUMP_ALL_REDS(p) do { \ if (!ERTS_PROC_GET_SAVED_CALLS_BUF((p))) \ (p)->fcalls = 0; \ |