aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL
diff options
context:
space:
mode:
Diffstat (limited to 'LuaSL')
-rwxr-xr-xLuaSL/build.sh2
-rw-r--r--LuaSL/src/LuaSL_threads.c50
2 files changed, 51 insertions, 1 deletions
diff --git a/LuaSL/build.sh b/LuaSL/build.sh
index dcd243d..39d3a55 100755
--- a/LuaSL/build.sh
+++ b/LuaSL/build.sh
@@ -63,7 +63,7 @@ command="edje_cc $EDJE_FLAGS LuaSL.edc ../LuaSL.edj"
63echo $command 63echo $command
64$command 64$command
65 65
66names="LuaSL_main LuaSL_compile LuaSL_utilities LuaSL_lexer LuaSL_lemon_yaccer" 66names="LuaSL_main LuaSL_compile LuaSL_threads LuaSL_utilities LuaSL_lexer LuaSL_lemon_yaccer"
67objects="../../libraries/luaproc/channel.o ../../libraries/luaproc/list.o ../../libraries/luaproc/luaproc.o ../../libraries/luaproc/sched.o " 67objects="../../libraries/luaproc/channel.o ../../libraries/luaproc/list.o ../../libraries/luaproc/luaproc.o ../../libraries/luaproc/sched.o "
68for i in $names 68for i in $names
69do 69do
diff --git a/LuaSL/src/LuaSL_threads.c b/LuaSL/src/LuaSL_threads.c
new file mode 100644
index 0000000..eb809b3
--- /dev/null
+++ b/LuaSL/src/LuaSL_threads.c
@@ -0,0 +1,50 @@
1/* This code is heavily based on luaproc.
2 *
3 * The luaproc copyright notice and license is -
4
5 ***************************************************
6
7Copyright 2008 Alexandre Skyrme, Noemi Rodriguez, Roberto Ierusalimschy
8
9Permission is hereby granted, free of charge, to any person obtaining a copy
10of this software and associated documentation files (the "Software"), to deal
11in the Software without restriction, including without limitation the rights
12to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13copies of the Software, and to permit persons to whom the Software is
14furnished to do so, subject to the following conditions:
15
16The above copyright notice and this permission notice shall be included in
17all copies or substantial portions of the Software.
18
19THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25THE SOFTWARE.
26
27 ****************************************************
28 *
29 * Additions and changes Copyright 2012 by David Seikel, using the above license.
30 */
31
32
33/* This is a redesign of luaproc. The design goals and notes -
34 *
35 * Use eina lists instead of the rolled your own lists.
36 * Looks like a FIFO double linked list.
37 * Use ecore threads instead of raw pthreads.
38 * Ecore threads pretty much wraps pthreads on posix, but has Windows support to.
39 * In general use EFL where it is useful.
40 * One fixed unique message channel per script.
41 * Probably one fixed unique message channel per object, which each script in the object shares.
42 * But might be better to handle that C side anyway.
43 * FIFO queue on message channels, seems the C socket queue is not enough.
44 * On the other hand, could just peel messages the socket queue, then shove them on the scripts queue.
45 * Better integration with LuaSL.
46 * Merge the luaproc structure with the script structure.
47 * Merge in the edje Lua code, and keep an eye on that, coz we might want to actually add this to edje Lua in the future.
48 * Use my coding standards, or EFL ones. Pffft.
49 *
50 */