diff options
author | Lukas Larsson <[email protected]> | 2014-02-24 16:45:04 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2014-02-24 16:45:04 +0100 |
commit | a157ffce8e25012512e0e5d88e05fb135792f161 (patch) | |
tree | 8c2bf21e8a401f696483d6e7d08ff00dd805c06c /lib/ose/doc/src/ose_erl_driver.xml | |
parent | 4ce83eb728748787f8a2da6155112c6da42a0eba (diff) | |
parent | 81abbc48e12317a07a8d2fcc041031c1c1567c8d (diff) | |
download | otp-a157ffce8e25012512e0e5d88e05fb135792f161.tar.gz otp-a157ffce8e25012512e0e5d88e05fb135792f161.tar.bz2 otp-a157ffce8e25012512e0e5d88e05fb135792f161.zip |
Merge branch 'lukas/ose/master/OTP-11334'
* lukas/ose/master/OTP-11334: (71 commits)
erts: Fix unix efile assert
ose: Use -O2 when building
ose: Expand OSE docs
ose: Add dummy ttsl driver
ose: Cleanup cleanup of mutex selection defines
ose: Polish mmap configure checks
ose: Add ose specific x-compile flags
ose: Updating fd_driver and spawn_driver for OSE
ose: Updating event and signal API for OSE
ose: Cleanup of mutex selection defines
win32: Compile erl_log.exe
ose: Remove uneccesary define
ose: Fix ssl configure test for osx
erts: Fix sys_msg_dispatcher assert
ose: Fix broken doc links
ose: Thread priorities configurable from lmconf
ose: Yielding the cpu is done "the OSE" way
ose: Start using ppdata for tse key
ose: Do not use spinlocks on OSE
ose: Fix support for crypto
...
Conflicts:
lib/crypto/c_src/crypto.c
Diffstat (limited to 'lib/ose/doc/src/ose_erl_driver.xml')
-rw-r--r-- | lib/ose/doc/src/ose_erl_driver.xml | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/lib/ose/doc/src/ose_erl_driver.xml b/lib/ose/doc/src/ose_erl_driver.xml new file mode 100644 index 0000000000..1d89d7aeea --- /dev/null +++ b/lib/ose/doc/src/ose_erl_driver.xml @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE cref SYSTEM "cref.dtd"> + +<cref> + <header> + <copyright> + <year>2013</year><year>2014</year> + <holder>Ericsson AB. All Rights Reserved.</holder> + </copyright> + <legalnotice> + The contents of this file are subject to the Erlang Public License, + Version 1.1, (the "License"); you may not use this file except in + compliance with the License. You should have received a copy of the + Erlang Public License along with this software. If not, it can be + retrieved online at http://www.erlang.org/. + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + </legalnotice> + + <title>erl_driver for Enea OSE</title> + <prepared>Lukas Larsson</prepared> + <docno></docno> + <date>2014-01-08</date> + <rev>A</rev> + <file>ose_erl_driver.xml</file> + </header> + <lib>ose_erl_driver</lib> + <libsummary>Linked-in drivers in Enea OSE</libsummary> + <description> + <p>Writing Linked-in drivers that also work on Enea OSE is very similar for + how you would do it for Unix. The difference from Unix is that + driver_select, ready_input and ready_output all work with signals + instead of file descriptors. This means that the driver_select is + used to specify which type of signal should trigger calls to + ready_input/ready_output. The functions described below are available + to driver programmers on Enea OSE to facilitate this. + </p> + </description> + <section> + <title>DATA TYPES</title> + + <taglist> + <tag><marker id="union_SIGNAL"/>union SIGNAL</tag> + <item>See the Enea OSE SPI documentation for a description.</item> + <tag><marker id="SIGSELECT"/>SIGSELECT</tag> + <item>See the Enea OSE SPI documentation for a description.</item> + <tag><marker id="ErlDrvEvent"/>ErlDrvEvent</tag> + <item>The <c>ErlDrvEvent</c> is a handle to a signal number and id combination. It is passed to <seealso marker="erts:erl_driver#driver_select">driver_select(3)</seealso>.</item> + <tag><marker id="ErlDrvOseEventId"/>ErlDrvOseEventId</tag> + <item>This is the id used to associate a specific signal to a + certain driver instance. </item> + </taglist> + </section> + <funcs> + <func> + <name><ret>union SIGNAL *</ret><nametext>erl_drv_ose_get_signal(ErlDrvEvent drv_event)</nametext></name> + <desc> + <marker id="erl_drv_ose_get_signal"></marker> + <p>Fetch the next signal associated with <c>drv_event</c>. + Signals will be returned in the order which they were received and + when no more signals are available <c>NULL</c> will be returned. + Use this function in the ready_input/ready_output callbacks + to get signals.</p> + </desc> + </func> + <func> + <name><ret>ErlDrvEvent</ret><nametext>erl_drv_ose_event_alloc(SIGSELECT signo, ErlDrvOseEventId id, ErlDrvOseEventId (*resolve_signal)(union SIGNAL* sig), void *extra)</nametext></name> + <desc> + <marker id="erl_drv_ose_event_alloc"></marker> + <p>Create a new <c>ErlDrvEvent</c> associated with <c>signo</c>, + <c>id</c> and uses the <c>resolve_signal</c> function to extract + the <c>id</c> from a signal with <c>signo</c>. The <c>extra</c> + parameter can be used for additional data. See + <seealso marker="ose_signals_chapter#driver"> + Signals in a Linked-in driver</seealso> in the OSE User's Guide. + </p> + </desc> + </func> + <func> + <name><ret>void</ret><nametext>erl_drv_ose_event_free(ErlDrvEvent drv_event)</nametext></name> + <desc> + <marker id="erl_drv_ose_event_free"></marker> + <p>Free a <c>ErlDrvEvent</c>. This should always be done in the + <seealso marker="erts:driver_entry#stop_select">stop_select</seealso> + callback when the event is no longer being used.</p> + </desc> + </func> + <func> + <name><ret>void</ret><nametext>erl_drv_ose_event_fetch(ErlDrvEvent drv_event, SIGSELECT *signo, ErlDrvOseEventId *id, void **extra)</nametext></name> + <desc> + <marker id="erl_drv_ose_event_fetch"></marker> + <p>Write the signal number, id and any extra data associated with <c>drv_event</c> + into <c>*signo</c> and <c>*id</c> respectively. <c>NULL</c> can be + also passed as <c>signo</c> or <c>id</c> in order to ignore that field. + </p> + </desc> + </func> + </funcs> + <section> + <title>SEE ALSO</title> + <p> + <seealso marker="erts:driver_entry">driver_entry(3)</seealso>, + <seealso marker="erts:erl_driver">erl_driver(3)</seealso> + </p> + </section> +</cref> |