aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_driver.h
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2014-01-10 17:17:58 +0100
committerLukas Larsson <[email protected]>2014-02-24 15:16:03 +0100
commitc64851d619fb916362abc8db9c28534eff39f53c (patch)
tree2407b3e10442243777c2a5e0f8d509d169cbd278 /erts/emulator/beam/erl_driver.h
parent6930aacf7236bbf1db67c8ad1bc1953127ac43f9 (diff)
downloadotp-c64851d619fb916362abc8db9c28534eff39f53c.tar.gz
otp-c64851d619fb916362abc8db9c28534eff39f53c.tar.bz2
otp-c64851d619fb916362abc8db9c28534eff39f53c.zip
ose: Rewrite resolve_signal API for ose drivers
This new API has less impact on the check_io code and also removes the callback from ErlDrvEntry. The downside is that you have to give the resolve function when creating each event. Also the mode if the resolve was removed as this mimics the win32 code and decreases complexity.
Diffstat (limited to 'erts/emulator/beam/erl_driver.h')
-rw-r--r--erts/emulator/beam/erl_driver.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/erts/emulator/beam/erl_driver.h b/erts/emulator/beam/erl_driver.h
index 9ede2982de..a15b0e17f5 100644
--- a/erts/emulator/beam/erl_driver.h
+++ b/erts/emulator/beam/erl_driver.h
@@ -272,14 +272,6 @@ typedef struct ErlDrvRWLock_ ErlDrvRWLock;
typedef int ErlDrvTSDKey;
/*
- * Potential OSE signals
- */
-#ifdef __OSE__
-typedef union SIGNAL OseSignal;
-#endif
-
-
-/*
*
*/
typedef struct erl_drv_port_data_lock * ErlDrvPDL;
@@ -353,9 +345,6 @@ typedef struct erl_drv_entry {
/* Called on behalf of driver_select when
it is safe to release 'event'. A typical
unix driver would call close(event) */
-#ifdef __OSE__
- int (*resolve_signal)(OseSignal* sig, int* mode);
-#endif
/* When adding entries here, dont forget to pad in obsolete/driver.h */
} ErlDrvEntry;
@@ -691,11 +680,13 @@ EXTERN int erl_drv_putenv(char *key, char *value);
EXTERN int erl_drv_getenv(char *key, char *value, size_t *value_size);
#ifdef __OSE__
-EXTERN OseSignal *erl_drv_ose_get_output_signal(ErlDrvEvent ev);
-EXTERN OseSignal *erl_drv_ose_get_input_signal(ErlDrvEvent ev);
-EXTERN ErlDrvEvent erl_drv_ose_event_alloc(SIGSELECT sig,int id);
+typedef ErlDrvUInt ErlDrvOseEventId;
+EXTERN union SIGNAL *erl_drv_ose_get_signal(ErlDrvEvent ev);
+EXTERN ErlDrvEvent erl_drv_ose_event_alloc(SIGSELECT sig,ErlDrvOseEventId id,
+ ErlDrvOseEventId (*resolve_signal)(union SIGNAL *sig));
EXTERN void erl_drv_ose_event_free(ErlDrvEvent ev);
-EXTERN void erl_drv_ose_event_fetch(ErlDrvEvent ev, SIGSELECT *sig,int *id);
+EXTERN void erl_drv_ose_event_fetch(ErlDrvEvent ev, SIGSELECT *sig,
+ ErlDrvOseEventId *id);
#endif
#endif /* !ERL_DRIVER_TYPES_ONLY */