diff options
Diffstat (limited to 'LuaSL')
-rwxr-xr-x | LuaSL/build.sh | 2 | ||||
-rw-r--r-- | LuaSL/src/LuaSL_threads.c | 50 |
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" | |||
63 | echo $command | 63 | echo $command |
64 | $command | 64 | $command |
65 | 65 | ||
66 | names="LuaSL_main LuaSL_compile LuaSL_utilities LuaSL_lexer LuaSL_lemon_yaccer" | 66 | names="LuaSL_main LuaSL_compile LuaSL_threads LuaSL_utilities LuaSL_lexer LuaSL_lemon_yaccer" |
67 | objects="../../libraries/luaproc/channel.o ../../libraries/luaproc/list.o ../../libraries/luaproc/luaproc.o ../../libraries/luaproc/sched.o " | 67 | objects="../../libraries/luaproc/channel.o ../../libraries/luaproc/list.o ../../libraries/luaproc/luaproc.o ../../libraries/luaproc/sched.o " |
68 | for i in $names | 68 | for i in $names |
69 | do | 69 | do |
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 | |||
7 | Copyright 2008 Alexandre Skyrme, Noemi Rodriguez, Roberto Ierusalimschy | ||
8 | |||
9 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
10 | of this software and associated documentation files (the "Software"), to deal | ||
11 | in the Software without restriction, including without limitation the rights | ||
12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
13 | copies of the Software, and to permit persons to whom the Software is | ||
14 | furnished to do so, subject to the following conditions: | ||
15 | |||
16 | The above copyright notice and this permission notice shall be included in | ||
17 | all copies or substantial portions of the Software. | ||
18 | |||
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
25 | THE 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 | */ | ||