From cb50ed84a2d8afc904d1c6ce90edb5c32da1be48 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 16 Dec 2010 12:21:27 +0100 Subject: Fix minor typos in erl_nif documentation enif_realloc_binary return int enif_alloc/enif_free does not accept env as first argument. enif_send return int enif_self in alphabetic order --- erts/doc/src/erl_nif.xml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 27887cbdf6..5987ddbd5e 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -4,7 +4,7 @@
- 20012010 + 20012011 Ericsson AB. All Rights Reserved. @@ -464,7 +464,7 @@ typedef enum { - void*enif_alloc(ErlNifEnv* env, size_t size) + void*enif_alloc(size_t size) Allocate dynamic memory.

Allocate memory of size bytes. Return NULL if allocation failed.

@@ -539,7 +539,7 @@ typedef enum {

Same as erl_drv_equal_tids.

- voidenif_free(ErlNifEnv* env, void* ptr) + voidenif_free(void* ptr) Free dynamic memory

Free memory allocated by enif_alloc.

@@ -857,11 +857,6 @@ typedef enum { enif_release_resource.

- ErlNifPid*enif_self(ErlNifEnv* caller_env, ErlNifPid* pid) - Get the pid of the calling process. -

Initialize the pid variable *pid to represent the - calling process. Return pid.

-
ERL_NIF_TERMenif_make_string(ErlNifEnv* env, const char* string, ErlNifCharEncoding encoding) Create a string.

Create a list containing the characters of the @@ -980,11 +975,12 @@ typedef enum { reload or upgrade.

Was previously named enif_get_data.

- voidenif_realloc_binary(ErlNifBinary* bin, size_t size) + intenif_realloc_binary(ErlNifBinary* bin, size_t size) Change the size of a binary.

Change the size of a binary bin. The source binary may be read-only, in which case it will be left untouched and - a mutable copy is allocated and assigned to *bin.

+ a mutable copy is allocated and assigned to *bin. Return true on success, + false if memory allocation failed.

voidenif_release_binary(ErlNifBinary* bin) Release a binary. @@ -1041,7 +1037,12 @@ typedef enum {

Same as erl_drv_rwlock_tryrwlock.

- unsignedenif_send(ErlNifEnv* env, ErlNifPid* to_pid, ErlNifEnv* msg_env, ERL_NIF_TERM msg) + ErlNifPid*enif_self(ErlNifEnv* caller_env, ErlNifPid* pid) + Get the pid of the calling process. +

Initialize the pid variable *pid to represent the + calling process. Return pid.

+
+ intenif_send(ErlNifEnv* env, ErlNifPid* to_pid, ErlNifEnv* msg_env, ERL_NIF_TERM msg) Send a message to a process.

Send a message to a process.

-- cgit v1.2.3 From 98e954dfaf707895f1558d51a1ea9fd22812e161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20Wei=C3=9F?= Date: Mon, 24 Jan 2011 17:36:57 +0100 Subject: Mention that "-detached" implies "-noinput" Clarify that specifying "-noinput" is unnecessary if the "-detached" flag is given. --- erts/doc/src/erl.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 77bd952d41..1e6e290f6b 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -231,7 +231,8 @@

Starts the Erlang runtime system detached from the system - console. Useful for running daemons and backgrounds processes.

+ console. Useful for running daemons and backgrounds processes. Implies + .

-- cgit v1.2.3 From c8ce455e3cd307a564a92161b9e082bcc3672f94 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 25 Jan 2011 14:42:03 +0100 Subject: Update escrips to allow the -n or -compile(native) flag, which compiles the code within the escript with the +native flag. You need an HiPE enabled emulator for this to work. --- erts/doc/src/escript.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/escript.xml b/erts/doc/src/escript.xml index 44c9a5ac68..588508aae6 100644 --- a/erts/doc/src/escript.xml +++ b/erts/doc/src/escript.xml @@ -153,7 +153,10 @@ halt(1).

Execution of interpreted code is slower than compiled code. If much of the execution takes place in interpreted code it may be worthwhile to compile it, even though the compilation - itself will take a little while.

+ itself will take a little while. It is also possible to supply + native instead of compile, this will compile the script + using the native flag, again depending on the characteristics + of the escript this could or could not be worth while.

As mentioned earlier, it is possible to have a script which contains precompiled beam code. In a precompiled @@ -397,6 +400,9 @@ ok Warnings and errors (if any) are written to the standard output, but the script will not be run. The exit status will be 0 if there were no errors, and 127 otherwise. + + -n + Compile the escript using the +native flag. -- cgit v1.2.3 From 68aed1c7441ceb2e8dd87f5fa9ac8fefe98e3b47 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Sun, 26 Dec 2010 17:56:42 +0100 Subject: Fix a couple typos in driver_entry(3) --- erts/doc/src/driver_entry.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/driver_entry.xml b/erts/doc/src/driver_entry.xml index dd949d4048..aa890e1ecd 100644 --- a/erts/doc/src/driver_entry.xml +++ b/erts/doc/src/driver_entry.xml @@ -36,7 +36,7 @@

As of erts version 5.5.3 the driver interface has been extended (see extended marker). - The extended interface introduce + The extended interface introduces version management, the possibility to pass capability flags (see driver flags) @@ -45,21 +45,21 @@

Old drivers (compiled with an erl_driver.h from an earlier erts version than 5.5.3) have to be recompiled - (but does not have to use the extended interface).

+ (but do not have to use the extended interface).

The driver_entry structure is a C struct that all erlang - drivers defines. It contains entry points for the erlang driver + drivers define. It contains entry points for the erlang driver that are called by the erlang emulator when erlang code accesses the driver.

The erl_driver driver - API functions needs a port handle + API functions need a port handle that identifies the driver instance (and the port in the emulator). This is only passed to the start function, but not to the other functions. The start function returns a driver-defined handle that is passed to the other functions. A - common practice is to have the start function allocating + common practice is to have the start function allocate some application-defined structure and stash the port handle in it, to use it later with the driver API functions.

The driver call-back functions are called synchronously from the @@ -235,7 +235,7 @@ typedef struct erl_drv_entry { void *handle -

This field is reserved for the emulators internal use. The +

This field is reserved for the emulator's internal use. The emulator will modify this field; therefore, it is important that the driver_entry isn't declared const.

@@ -399,7 +399,7 @@ typedef struct erl_drv_entry { void *handle2

- This field is reserved for the emulators internal use. The + This field is reserved for the emulator's internal use. The emulator will modify this field; therefore, it is important that the driver_entry isn't declared const.

-- cgit v1.2.3 From dd3e666c5114f81c9518e9f5ba14959ced079ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Mon, 14 Dec 2009 23:04:00 +0100 Subject: Add dependencies Makefile generation to erlc(1) and compile(3) This is useful when a project is built with Makefiles and erlc(1) instead of EMakefiles. Tracking dependencies by hand is error-prone and it becomes painful when using external application headers like EUnit's one. A dependencies Makefile will look like this: module.beam: module.erl \ /usr/local/lib/erlang/lib/eunit-2.1.4/include/eunit.hrl \ header.hrl When included in the main Makefile, 'module' will be recompiled only when needed. GCC offers the same feature and new erlc(1) options are compatible with it. More informations at: http://wiki.github.com/dumbbell/otp/dependencies-makefile --- erts/doc/src/erlc.xml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlc.xml b/erts/doc/src/erlc.xml index 1e8960c22c..7e689c418e 100644 --- a/erts/doc/src/erlc.xml +++ b/erts/doc/src/erlc.xml @@ -141,6 +141,50 @@ for compiling native code, which needs to be compiled with the same run-time system that it should be run on.

+ -M + +

Produces a Makefile rule to track headers dependencies. The + rule is sent to stdout. No object file is produced. +

+
+ -MF Makefile + +

Like the option above, except that the + Makefile is written to Makefile. No object + file is produced. +

+
+ -MD + +

Same as .Pbeam]]>. +

+
+ -MT Target + +

In conjunction with or + , change the name of the rule emitted + to Target. +

+
+ -MQ Target + +

Like the option above, except that + characters special to make(1) are quoted. +

+
+ -MP + +

In conjunction with or + , add a phony target for each dependency. +

+
+ -MG + +

In conjunction with or + , consider missing headers as generated + files and add them to the dependencies. +

+
--

Signals that no more options will follow. -- cgit v1.2.3 From 1580937874b35350c0ff5c2a72b2540d7ec28378 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 15 Feb 2011 14:48:08 +0100 Subject: Allow unexpected driver input event in driver_SUITE:smp_select epoll on Linux has been seen to sometimes trigger unexpected events. Most of the time these events are filtered by erl_check_io, but may slip up to the driver in cases when fd's are reused. Also made clear in driver docs that spurious events may happen. --- erts/doc/src/driver_entry.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/driver_entry.xml b/erts/doc/src/driver_entry.xml index dd949d4048..7d1585f483 100644 --- a/erts/doc/src/driver_entry.xml +++ b/erts/doc/src/driver_entry.xml @@ -4,7 +4,7 @@

- 20012010 + 20012011 Ericsson AB. All Rights Reserved. @@ -219,6 +219,10 @@ typedef struct erl_drv_entry { completes, write to the pipe (use SetEvent on Windows), this will make the emulator call ready_input or ready_output.

+

Spurious events may happen. That is, calls to ready_input + or ready_output even though no real events are signaled. In + reality it should be rare (and OS dependant), but a robust driver + must nevertheless be able to handle such cases.

char *driver_name -- cgit v1.2.3 From 804bb7f78fcf94609f31a9d429b82c37d1f1173b Mon Sep 17 00:00:00 2001 From: Kostis Sagonas Date: Wed, 2 Mar 2011 09:32:09 +0200 Subject: Document exiting and garbage_collecting process statuses --- erts/doc/src/erlang.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 78d58a1e56..c3f06982f5 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -3980,7 +3980,8 @@ os_prompt% {status, Status}

Status is the status of the process. Status - is waiting (waiting for a message), running, + is exiting, garbage_collecting, + waiting (for a message), running, runnable (ready to run, but another process is running), or suspended (suspended on a "busy" port or by the erlang:suspend_process/[1,2] BIF).

-- cgit v1.2.3