From 3061ecca3d0fdfb87dabbf5f63c9e06c2a30f53a Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 23 Aug 2018 17:08:59 +0200 Subject: o Initial import. --- .../protothreads/pt-1.4/doc/html/a00017.html | 226 +++++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 thirdparty/nRF5_SDK_15.0.0_a53641a/external/protothreads/pt-1.4/doc/html/a00017.html (limited to 'thirdparty/nRF5_SDK_15.0.0_a53641a/external/protothreads/pt-1.4/doc/html/a00017.html') diff --git a/thirdparty/nRF5_SDK_15.0.0_a53641a/external/protothreads/pt-1.4/doc/html/a00017.html b/thirdparty/nRF5_SDK_15.0.0_a53641a/external/protothreads/pt-1.4/doc/html/a00017.html new file mode 100644 index 0000000..9a37968 --- /dev/null +++ b/thirdparty/nRF5_SDK_15.0.0_a53641a/external/protothreads/pt-1.4/doc/html/a00017.html @@ -0,0 +1,226 @@ + + +The Protothreads Library 1.4: Local continuations + + + + +
+
+

Local continuations
+ +[Protothreads] +


Detailed Description

+Local continuations form the basis for implementing protothreads. +

+A local continuation can be set in a specific function to capture the state of the function. After a local continuation has been set can be resumed in order to restore the state of the function at the point where the local continuation was set. +

+ + + + + + + +

+

+ + + +

+

+ + + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Files

file  lc.h
 Local continuations.
file  lc-switch.h
 Implementation of local continuations based on switch() statment.
file  lc-addrlabels.h
 Implementation of local continuations based on the "Labels as values" feature of gcc.

Defines

#define LC_INIT(lc)
 Initialize a local continuation.
#define LC_SET(lc)
 Set a local continuation.
#define LC_RESUME(lc)
 Resume a local continuation.
#define LC_END(lc)
 Mark the end of local continuation usage.
+#define LC_INIT(s)   s = 0;
+#define LC_RESUME(s)   switch(s) { case 0:
+#define LC_SET(s)   s = __LINE__; case __LINE__:
+#define LC_END(s)   }
+#define LC_INIT(s)   s = NULL
+#define LC_RESUME(s)
+#define LC_CONCAT2(s1, s2)   s1##s2
+#define LC_CONCAT(s1, s2)   LC_CONCAT2(s1, s2)
+#define LC_SET(s)
+#define LC_END(s)

Typedefs

+typedef unsigned short lc_t
 The local continuation type.
+typedef void * lc_t
+


Define Documentation

+

+ + + + +
+ + + + + + + + + +
#define LC_END lc   ) 
+
+ + + + + +
+   + + +

+Mark the end of local continuation usage. +

+The end operation signifies that local continuations should not be used any more in the function. This operation is not needed for most implementations of local continuation, but is required by a few implementations. +

+Definition at line 108 of file lc.h.

+

+ + + + +
+ + + + + + + + + +
#define LC_INIT lc   ) 
+
+ + + + + +
+   + + +

+Initialize a local continuation. +

+This operation initializes the local continuation, thereby unsetting any previously set continuation state. +

+Definition at line 71 of file lc.h.

+

+ + + + +
+ + + + + + + + + +
#define LC_RESUME lc   ) 
+
+ + + + + +
+   + + +

+Resume a local continuation. +

+The resume operation resumes a previously set local continuation, thus restoring the state in which the function was when the local continuation was set. If the local continuation has not been previously set, the resume operation does nothing. +

+Definition at line 96 of file lc.h.

+

+ + + + +
+ + + + + + + + + +
#define LC_SET lc   ) 
+
+ + + + + +
+   + + +

+Set a local continuation. +

+The set operation saves the state of the function at the point where the operation is executed. As far as the set operation is concerned, the state of the function does not include the call-stack or local (automatic) variables, but only the program counter and such CPU registers that needs to be saved. +

+Definition at line 84 of file lc.h.

+


Generated on Mon Oct 2 10:06:29 2006 for The Protothreads Library 1.4 by  + +doxygen 1.4.6
+ + -- cgit v1.2.3