summaryrefslogtreecommitdiffstats
path: root/xml
diff options
context:
space:
mode:
authorVasilii Chernov <vchernov@inr.ru>2016-03-01 10:42:40 +0100
committerVasilii Chernov <vchernov@inr.ru>2016-03-01 10:42:40 +0100
commit5d775d64bdec554b9842823bd1c46263210425fd (patch)
treecb1da12066687273f7dccace7aba4ee1ff2ba25c /xml
parent0e584d07a0776454fd5487b7d23407c0624b56c2 (diff)
downloadpcitool-5d775d64bdec554b9842823bd1c46263210425fd.tar.gz
pcitool-5d775d64bdec554b9842823bd1c46263210425fd.tar.bz2
pcitool-5d775d64bdec554b9842823bd1c46263210425fd.tar.xz
pcitool-5d775d64bdec554b9842823bd1c46263210425fd.zip
1. multithreading:
- Enable multiprocessing for api_server - Enable mutrithreading for html_server 2. py: - extract pcilib->py bases from pcilib->py functions - add api for interact directly with pcilib->py without pcilib context. 3. pcipywrap - Add scripts handling.
Diffstat (limited to 'xml')
-rw-r--r--xml/scripts/test_script.py4
-rw-r--r--xml/scripts/test_script2.py4
-rw-r--r--xml/test/test_prop_mt.py6
3 files changed, 11 insertions, 3 deletions
diff --git a/xml/scripts/test_script.py b/xml/scripts/test_script.py
new file mode 100644
index 0000000..16e4adb
--- /dev/null
+++ b/xml/scripts/test_script.py
@@ -0,0 +1,4 @@
+description='this is a test script'
+
+def run(ctx, inpt):
+ return ctx.get_registers_list();
diff --git a/xml/scripts/test_script2.py b/xml/scripts/test_script2.py
new file mode 100644
index 0000000..16e4adb
--- /dev/null
+++ b/xml/scripts/test_script2.py
@@ -0,0 +1,4 @@
+description='this is a test script'
+
+def run(ctx, inpt):
+ return ctx.get_registers_list();
diff --git a/xml/test/test_prop_mt.py b/xml/test/test_prop_mt.py
index f8c63d0..3714597 100644
--- a/xml/test/test_prop_mt.py
+++ b/xml/test/test_prop_mt.py
@@ -4,15 +4,15 @@ lock = threading.Lock()
def read_from_register(ctx, value):
with lock:
- ctx.lock('lock5')
+ ctx.lock('lock12')
cur = read_from_register.counter
read_from_register.counter += 1
- for i in range (0, 5):
+ for i in range (0, 60):
time.sleep(0.1)
print cur
out = ctx.get_property('/test/prop3') / 2
- ctx.unlock('lock5')
+ ctx.unlock('lock12')
return out