diff options
author | Rickard Green <[email protected]> | 2012-09-16 02:45:32 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2012-12-03 21:18:10 +0100 |
commit | 23c6f9e07a3cae7c05e55abd01ff798384241538 (patch) | |
tree | dc62a1976380ea69f3843e1d53ef53526fdabd3e /erts/emulator/beam/erl_port.h | |
parent | 34fc6f243f8a462f4b2370a9fe5376df1ca08f1d (diff) | |
download | otp-23c6f9e07a3cae7c05e55abd01ff798384241538.tar.gz otp-23c6f9e07a3cae7c05e55abd01ff798384241538.tar.bz2 otp-23c6f9e07a3cae7c05e55abd01ff798384241538.zip |
Add erl_drv_[send|output]_term
Diffstat (limited to 'erts/emulator/beam/erl_port.h')
-rw-r--r-- | erts/emulator/beam/erl_port.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_port.h b/erts/emulator/beam/erl_port.h index 00394f279e..6ad92dcd7d 100644 --- a/erts/emulator/beam/erl_port.h +++ b/erts/emulator/beam/erl_port.h @@ -113,7 +113,7 @@ struct _erl_drv_port { erts_atomic32_t refc; int cleanup; #endif - Eterm connected; /* A connected process */ + erts_smp_atomic_t connected;/* A connected process */ Eterm caller; /* Current caller. */ Eterm data; /* Data associated with port. */ ErlHeapFragment* bp; /* Heap fragment holding data (NULL if imm data). */ @@ -358,6 +358,17 @@ erts_smp_port_unlock(Port *prt) #define ERTS_PORT_SCHED_ID(P, ID) \ ((Uint) (UWord) erts_prtsd_set((P), ERTS_PSD_SCHED_ID, (void *) (UWord) (ID))) +#define ERTS_PORT_INIT_CONNECTED(PRT, PID) \ + erts_smp_atomic_init_nob(&(PRT)->connected, (erts_aint_t) (PID)) +#define ERTS_PORT_SET_CONNECTED(PRT, PID) \ + erts_smp_atomic_set_nob(&(PRT)->connected, (erts_aint_t) (PID)) +#define ERTS_PORT_SET_CONNECTED_RELB(PRT, PID) \ + erts_smp_atomic_set_relb(&(PRT)->connected, (erts_aint_t) (PID)) +#define ERTS_PORT_GET_CONNECTED(PRT) \ + ((Eterm) erts_smp_atomic_read_nob(&(PRT)->connected)) +#define ERTS_PORT_GET_CONNECTED_ACQB(PRT) \ + ((Eterm) erts_smp_atomic_read_acqb(&(PRT)->connected)) + extern const Port erts_invalid_port; #define ERTS_PORT_LOCK_BUSY ((Port *) &erts_invalid_port) |