diff options
author | xsipewe <[email protected]> | 2016-10-20 11:46:03 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-10-20 14:10:04 +0200 |
commit | 031f9ca91ade7fbb9e31c82545401b8a5531e539 (patch) | |
tree | ab191bf48e2e67d99d8e03fd0482ec0f0897e519 /lib/erl_interface/doc/src/erl_global.xml | |
parent | 9f5b69e8def226f1d1ce9262477d5bbd1cbc1fe7 (diff) | |
download | otp-031f9ca91ade7fbb9e31c82545401b8a5531e539.tar.gz otp-031f9ca91ade7fbb9e31c82545401b8a5531e539.tar.bz2 otp-031f9ca91ade7fbb9e31c82545401b8a5531e539.zip |
erl_interface: Editorial changes
Diffstat (limited to 'lib/erl_interface/doc/src/erl_global.xml')
-rw-r--r-- | lib/erl_interface/doc/src/erl_global.xml | 122 |
1 files changed, 67 insertions, 55 deletions
diff --git a/lib/erl_interface/doc/src/erl_global.xml b/lib/erl_interface/doc/src/erl_global.xml index 69f303722d..fa565ba56c 100644 --- a/lib/erl_interface/doc/src/erl_global.xml +++ b/lib/erl_interface/doc/src/erl_global.xml @@ -28,91 +28,100 @@ <docno></docno> <approved>Gordon Beaton</approved> <checked>Gordon Beaton</checked> - <date>980703</date> + <date>1998-07-03</date> <rev>A</rev> <file>erl_global.xml</file> </header> <lib>erl_global</lib> - <libsummary>Access globally registered names</libsummary> + <libsummary>Access globally registered names.</libsummary> <description> <p>This module provides support for registering, looking - up and unregistering names in the Erlang Global module. For more - information, see the description of Global in the reference manual.</p> - <p>Note that the functions below perform an RPC using an open file + up, and unregistering names in the <c>global</c> module. + For more information, see + <seealso marker="kernel:global"><c>kernel:global</c></seealso>.</p> + + <p>Notice that the functions below perform an RPC using an open file descriptor provided by the caller. This file descriptor must - not be used for other traffic during the global operation or the - function may receive unexpected data and fail.</p> + not be used for other traffic during the global operation, as the + function can then receive unexpected data and fail.</p> </description> + <funcs> <func> <name><ret>char **</ret><nametext>erl_global_names(fd,count)</nametext></name> - <fsummary>Obtain list of Global names.</fsummary> + <fsummary>Obtain list of global names.</fsummary> + <marker id="erl_global_names"/> <type> <v>int fd;</v> <v>int *count;</v> </type> <desc> - <p>Retrieve a list of all known global names. - </p> - <p><c><![CDATA[fd]]></c> is an open descriptor to an Erlang connection. - </p> - <p><c><![CDATA[count]]></c> is the address of an integer, or NULL. If - <c><![CDATA[count]]></c> is not NULL, it will be set by the function to - the number of names found. - </p> + <p>Retrieves a list of all known global names.</p> + <list type="bulleted"> + <item><c><![CDATA[fd]]></c> is an open descriptor to an Erlang + connection.</item> + <item><c><![CDATA[count]]></c> is the address of an integer, or + <c>NULL</c>. If <c><![CDATA[count]]></c> is not <c>NULL</c>, it is + set by the function to the number of names found.</item> + </list> <p>On success, the function returns an array of strings, each - containing a single registered name, and sets <c><![CDATA[count]]></c> to + containing a single registered name, and sets + <c><![CDATA[count]]></c> to the number of names found. The array is terminated - by a single NULL pointer. On failure, the function returns - NULL and <c><![CDATA[count]]></c> is not modified. - </p> + by a single <c>NULL</c> pointer. On failure, the function returns + <c>NULL</c> and <c><![CDATA[count]]></c> is not modified.</p> <note> <p>It is the caller's responsibility to free the array afterwards. It has been allocated by the function with a - single call to <c><![CDATA[malloc()]]></c>, so a single <c><![CDATA[free()]]></c> is - all that is necessary.</p> + single call to <c><![CDATA[malloc()]]></c>, so a single + <c><![CDATA[free()]]></c> is all that is necessary.</p> </note> </desc> </func> + <func> <name><ret>int</ret><nametext>erl_global_register(fd,name,pid)</nametext></name> - <fsummary>Register a name in Global.</fsummary> + <fsummary>Register a name in global.</fsummary> <type> <v>int fd;</v> <v>const char *name;</v> <v>ETERM *pid;</v> </type> <desc> - <p>This function registers a name in Global. - </p> - <p><c><![CDATA[fd]]></c> is an open descriptor to an Erlang connection. - </p> - <p><c><![CDATA[name]]></c> is the name to register in Global. - </p> - <p><c><![CDATA[pid]]></c> is the pid that should be associated with - <c><![CDATA[name]]></c>. This is the value that Global will return when - processes request the location of <c><![CDATA[name]]></c>. - </p> - <p>The function returns 0 on success, or -1 on failure.</p> + <p>Registers a name in <c>global</c>.</p> + <list type="bulleted"> + <item><c><![CDATA[fd]]></c> is an open descriptor to an Erlang + connection.</item> + <item><c><![CDATA[name]]></c> is the name to register in + <c>global</c>.</item> + <item><c><![CDATA[pid]]></c> is the pid that is to be associated with + <c><![CDATA[name]]></c>. This value is returned by <c>global</c> + when processes request the location of <c><![CDATA[name]]></c>. + </item> + </list> + <p>Returns <c>0</c> on success, otherwise <c>-1</c>.</p> </desc> </func> + <func> <name><ret>int</ret><nametext>erl_global_unregister(fd,name)</nametext></name> - <fsummary>Unregister a name in Global.</fsummary> + <fsummary>Unregister a name from global.</fsummary> <type> <v>int fd;</v> <v>const char *name;</v> </type> <desc> - <p>This function unregisters a name from Global. - </p> - <p><c><![CDATA[fd]]></c> is an open descriptor to an Erlang connection. - </p> - <p><c><![CDATA[name]]></c> is the name to unregister from Global. - </p> - <p>The function returns 0 on success, or -1 on failure.</p> + <p>Unregisters a name from <c>global</c>.</p> + <list type="bulleted"> + <item><c><![CDATA[fd]]></c> is an open descriptor to an Erlang + connection.</item> + <item><c><![CDATA[name]]></c> is the name to unregister from + <c>global</c>.</item> + </list> + <p>Returns <c>0</c> on success, otherwise <c>-1</c>.</p> </desc> </func> + <func> <name><ret>ETERM *</ret><nametext>erl_global_whereis(fd,name,node)</nametext></name> <fsummary>Look up a name in global.</fsummary> @@ -122,19 +131,22 @@ <v>char *node;</v> </type> <desc> - <p><c><![CDATA[fd]]></c> is an open descriptor to an Erlang connection. - </p> - <p><c><![CDATA[name]]></c> is the name that is to be looked up in Global. - </p> - <p>If <c><![CDATA[node]]></c> is not NULL, it is a pointer to a buffer - where the function can fill in the name of the node where - <c><![CDATA[name]]></c> is found. <c><![CDATA[node]]></c> can be passed directly to - <c><![CDATA[erl_connect()]]></c> if necessary. - </p> - <p>On success, the function returns an Erlang Pid containing the address - of the given name, and node will be initialized to - the nodename where <c><![CDATA[name]]></c> is found. On failure NULL will be - returned and <c><![CDATA[node]]></c> will not be modified.</p> + <p>Looks up a name in <c>global</c>.</p> + <list type="bulleted"> + <item><c><![CDATA[fd]]></c> is an open descriptor to an Erlang + connection.</item> + <item><c><![CDATA[name]]></c> is the name that is to be looked up in + <c>global</c>.</item> + </list> + <p>If <c><![CDATA[node]]></c> is not <c>NULL</c>, it is a pointer to a + buffer where the function can fill in the name of the node where + <c><![CDATA[name]]></c> is found. <c><![CDATA[node]]></c> can be + passed directly to <c><![CDATA[erl_connect()]]></c> if necessary.</p> + <p>On success, the function returns an Erlang pid containing the address + of the specified name, and the node is initialized to + the node name where <c><![CDATA[name]]></c> is found. On failure, + <c>NULL</c> is returned and <c><![CDATA[node]]></c> is not + modified.</p> </desc> </func> </funcs> |