aboutsummaryrefslogtreecommitdiffstats
path: root/lib/runtime_tools/c_src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-12-09 12:33:08 +0100
committerBjörn Gustavsson <[email protected]>2011-12-09 12:33:08 +0100
commit7bd353a976a0bf4d93b962376daa0d38958335d0 (patch)
tree2fac432e0077eed23aa4df31500928628628b362 /lib/runtime_tools/c_src
parent4a7dfc9733d8af85955baefc79bcff7d72971d68 (diff)
parentdeca218163838f88ade8f62eca60d8d67db00f0d (diff)
downloadotp-7bd353a976a0bf4d93b962376daa0d38958335d0.tar.gz
otp-7bd353a976a0bf4d93b962376daa0d38958335d0.tar.bz2
otp-7bd353a976a0bf4d93b962376daa0d38958335d0.zip
Merge branch 'raimo/64-bit-driver-api/OTP-9795'
* raimo/64-bit-driver-api/OTP-9795: (22 commits) driver_SUITE.erl: Fix sys info drivers emulator test drivers: Conform to updated driver API runtime_tools's drivers: Conform to updated driver API ws's xwe_driver.c: Conform to updated driver API megaco's flex scanner: Conform to updated driver API seq_trace_SUITE_data/echo_drv.c: Conform to updated driver API erl_interface tests: Conform port_call_drv.c updated driver API erl_drv_thread_SUITE_data/testcase_driver.c: Conform to updated driver API float_SUITE_data/fp_drv.c: Conform to updated driver API port_SUITE_data/*_drv.c: Conform to updated driver API port_bif_SUITE_data/control_drv.c: Conform to updated driver API send_term_SUITE_data/send_term_drv.c: Conform to updated driver API system_profile_SUITE_data/echo_drv.c: Conform to updated driver API trace_port_SUITE_data/echo_drv.c: Conform to updated driver API Remove support for old drivers without ERL_DRV_EXTENDED_MARKER built-in drivers: Add ERL_DRV_EXTENDED_MARKER and version numbers Bump driver version to 2.0 erl_driver.h: Enlarge type on return value from call erl_driver.h: Enlarge types on driver callbacks output, control and call erl_driver.h: Enlarge types in driver output functions ... Conflicts: erts/emulator/test/driver_SUITE_data/monitor_drv.c erts/emulator/test/driver_SUITE_data/timer_drv.c
Diffstat (limited to 'lib/runtime_tools/c_src')
-rw-r--r--lib/runtime_tools/c_src/trace_file_drv.c33
-rw-r--r--lib/runtime_tools/c_src/trace_ip_drv.c19
2 files changed, 35 insertions, 17 deletions
diff --git a/lib/runtime_tools/c_src/trace_file_drv.c b/lib/runtime_tools/c_src/trace_file_drv.c
index 5de2a65917..08bace80ef 100644
--- a/lib/runtime_tools/c_src/trace_file_drv.c
+++ b/lib/runtime_tools/c_src/trace_file_drv.c
@@ -173,11 +173,13 @@ static TraceFileData *first_data;
*/
static ErlDrvData trace_file_start(ErlDrvPort port, char *buff);
static void trace_file_stop(ErlDrvData handle);
-static void trace_file_output(ErlDrvData handle, char *buff, int bufflen);
+static void trace_file_output(ErlDrvData handle, char *buff,
+ ErlDrvSizeT bufflen);
static void trace_file_finish(void);
-static int trace_file_control(ErlDrvData handle, unsigned int command,
- char* buff, int count,
- char** res, int res_size);
+static ErlDrvSSizeT trace_file_control(ErlDrvData handle,
+ unsigned int command,
+ char* buff, ErlDrvSizeT count,
+ char** res, ErlDrvSizeT res_size);
static void trace_file_timeout(ErlDrvData handle);
/*
@@ -215,7 +217,18 @@ ErlDrvEntry trace_file_driver_entry = {
NULL, /* void * that is not used (BC) */
trace_file_control, /* F_PTR control, port_control callback */
trace_file_timeout, /* F_PTR timeout, driver_set_timer callback */
- NULL /* F_PTR outputv, reserved */
+ NULL, /* F_PTR outputv, reserved */
+ NULL, /* ready_async */
+ NULL, /* flush */
+ NULL, /* call */
+ NULL, /* event */
+ ERL_DRV_EXTENDED_MARKER,
+ ERL_DRV_EXTENDED_MAJOR_VERSION,
+ ERL_DRV_EXTENDED_MINOR_VERSION,
+ 0,
+ NULL,
+ NULL,
+ NULL,
};
/*
@@ -351,7 +364,8 @@ static void trace_file_stop(ErlDrvData handle)
/*
** Data sent from erlang to port.
*/
-static void trace_file_output(ErlDrvData handle, char *buff, int bufflen)
+static void trace_file_output(ErlDrvData handle, char *buff,
+ ErlDrvSizeT bufflen)
{
int heavy = 0;
TraceFileData *data = (TraceFileData *) handle;
@@ -395,9 +409,10 @@ static void trace_file_output(ErlDrvData handle, char *buff, int bufflen)
/*
** Control message from erlang, we handle $f, which is flush.
*/
-static int trace_file_control(ErlDrvData handle, unsigned int command,
- char* buff, int count,
- char** res, int res_size)
+static ErlDrvSSizeT trace_file_control(ErlDrvData handle,
+ unsigned int command,
+ char* buff, ErlDrvSizeT count,
+ char** res, ErlDrvSizeT res_size)
{
if (command == 'f') {
TraceFileData *data = (TraceFileData *) handle;
diff --git a/lib/runtime_tools/c_src/trace_ip_drv.c b/lib/runtime_tools/c_src/trace_ip_drv.c
index d2ed1a294b..713ae924f6 100644
--- a/lib/runtime_tools/c_src/trace_ip_drv.c
+++ b/lib/runtime_tools/c_src/trace_ip_drv.c
@@ -185,7 +185,8 @@ static TraceIpData *first_data;
*/
static ErlDrvData trace_ip_start(ErlDrvPort port, char *buff);
static void trace_ip_stop(ErlDrvData handle);
-static void trace_ip_output(ErlDrvData handle, char *buff, int bufflen);
+static void trace_ip_output(ErlDrvData handle, char *buff,
+ ErlDrvSizeT bufflen);
#ifdef __WIN32__
static void trace_ip_event(ErlDrvData handle, ErlDrvEvent event);
#endif
@@ -193,9 +194,10 @@ static void trace_ip_ready_input(ErlDrvData handle, ErlDrvEvent fd);
static void trace_ip_ready_output(ErlDrvData handle, ErlDrvEvent fd);
static void trace_ip_finish(void); /* No arguments, despite what might be stated
in any documentation */
-static int trace_ip_control(ErlDrvData handle, unsigned int command,
- char* buff, int count,
- char** res, int res_size);
+static ErlDrvSSizeT trace_ip_control(ErlDrvData handle,
+ unsigned int command,
+ char* buff, ErlDrvSizeT count,
+ char** res, ErlDrvSizeT res_size);
/*
** Internal routines
@@ -382,7 +384,7 @@ static void trace_ip_stop(ErlDrvData handle)
/*
** Data sent from erlang to port.
*/
-static void trace_ip_output(ErlDrvData handle, char *buff, int bufflen)
+static void trace_ip_output(ErlDrvData handle, char *buff, ErlDrvSizeT bufflen)
{
TraceIpData *data = (TraceIpData *) handle;
if (data->flags & FLAG_LISTEN_PORT) {
@@ -548,9 +550,10 @@ static void trace_ip_ready_output(ErlDrvData handle, ErlDrvEvent fd)
/*
** Control message from erlang, we handle $p, which is get_listen_port.
*/
-static int trace_ip_control(ErlDrvData handle, unsigned int command,
- char* buff, int count,
- char** res, int res_size)
+static ErlDrvSSizeT trace_ip_control(ErlDrvData handle,
+ unsigned int command,
+ char* buff, ErlDrvSizeT count,
+ char** res, ErlDrvSizeT res_size)
{
register void *void_ptr; /* Soft type cast */