初始版本
229
external/protothreads/pt-1.4/doc/Doxyfile
vendored
Normal file
@@ -0,0 +1,229 @@
|
||||
# Doxyfile 1.4.6
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = "The Protothreads Library 1.4"
|
||||
PROJECT_NUMBER =
|
||||
OUTPUT_DIRECTORY = .
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
USE_WINDOWS_ENCODING = NO
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF =
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = YES
|
||||
STRIP_FROM_PATH = ../
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = YES
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
DETAILS_AT_TOP = YES
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 8
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
BUILTIN_STL_SUPPORT = NO
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
SUBGROUPING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = NO
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_STATIC = NO
|
||||
EXTRACT_LOCAL_CLASSES = NO
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
HIDE_UNDOC_MEMBERS = YES
|
||||
HIDE_UNDOC_CLASSES = YES
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = NO
|
||||
GENERATE_DEPRECATEDLIST= NO
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = NO
|
||||
SHOW_DIRECTORIES = NO
|
||||
FILE_VERSION_FILTER =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = pt-mainpage.txt \
|
||||
pt-doc.txt \
|
||||
../pt.h \
|
||||
../pt-sem.h \
|
||||
../lc.h \
|
||||
../lc-switch.h \
|
||||
../lc-addrlabels.h
|
||||
FILE_PATTERNS =
|
||||
RECURSIVE = NO
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXAMPLE_PATH = ..
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = YES
|
||||
INLINE_SOURCES = YES
|
||||
STRIP_CODE_COMMENTS = NO
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_RELATION = YES
|
||||
USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
GENERATE_HTMLHELP = YES
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = YES
|
||||
TREEVIEW_WIDTH = 250
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = YES
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = YES
|
||||
PAPER_TYPE = a4
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER = header.tex
|
||||
PDF_HYPERLINKS = YES
|
||||
USE_PDFLATEX = YES
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_PROGRAMLISTING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = DOXYGEN
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = NO
|
||||
HIDE_UNDOC_RELATIONS = NO
|
||||
HAVE_DOT = NO
|
||||
CLASS_GRAPH = NO
|
||||
COLLABORATION_GRAPH = YES
|
||||
GROUP_GRAPHS = YES
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = NO
|
||||
INCLUDE_GRAPH = NO
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
CALL_GRAPH = YES
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
DOT_TRANSPARENT = NO
|
||||
DOT_MULTI_TARGETS = NO
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
||||
7
external/protothreads/pt-1.4/doc/Makefile
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
dox:
|
||||
doxygen Doxyfile
|
||||
|
||||
|
||||
pdf: dox
|
||||
(cd latex; $(MAKE) refman.pdf)
|
||||
mv latex/refman.pdf pt-refman.pdf
|
||||
52
external/protothreads/pt-1.4/doc/header.tex
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
\documentclass[a4paper]{article}
|
||||
\usepackage{a4wide}
|
||||
\usepackage{makeidx}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{multicol}
|
||||
\usepackage{float}
|
||||
\usepackage{textcomp}
|
||||
\usepackage{alltt}
|
||||
\usepackage{times}
|
||||
\usepackage{epsfig}
|
||||
\ifx\pdfoutput\undefined
|
||||
\usepackage[ps2pdf,
|
||||
pagebackref=true,
|
||||
colorlinks=true,
|
||||
linkcolor=blue
|
||||
]{hyperref}
|
||||
\usepackage{pspicture}
|
||||
\else
|
||||
\usepackage[pdftex,
|
||||
pagebackref=true,
|
||||
colorlinks=true,
|
||||
linkcolor=blue
|
||||
]{hyperref}
|
||||
\fi
|
||||
\usepackage{doxygen}
|
||||
\makeindex
|
||||
\setcounter{tocdepth}{1}
|
||||
\renewcommand{\footrulewidth}{0.4pt}
|
||||
\begin{document}
|
||||
\begin{titlepage}
|
||||
\vspace*{5cm}
|
||||
\begin{center}
|
||||
{\Huge Protothreads}\\
|
||||
\vspace*{1cm}
|
||||
{\LARGE The Protothreads Library 1.3 Reference Manual}\\
|
||||
\vspace*{3cm}
|
||||
{\Large June 2006}\\
|
||||
\vspace*{2cm}
|
||||
\includegraphics[width=6cm]{../sicslogo.pdf}\\
|
||||
\vspace*{1cm}
|
||||
{\Large Adam Dunkels}\\
|
||||
{\Large \texttt{adam@sics.se}}\\
|
||||
\vspace*{1cm}
|
||||
{\LARGE Swedish Institute of Computer Science}\\
|
||||
\vspace*{0.5cm}
|
||||
|
||||
\end{center}
|
||||
\end{titlepage}
|
||||
\pagenumbering{roman}
|
||||
\tableofcontents
|
||||
\pagenumbering{arabic}
|
||||
310
external/protothreads/pt-1.4/doc/html/doxygen.css
vendored
Normal file
@@ -0,0 +1,310 @@
|
||||
BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
|
||||
font-family: Geneva, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
BODY,TD {
|
||||
font-size: 90%;
|
||||
}
|
||||
H1 {
|
||||
text-align: center;
|
||||
font-size: 160%;
|
||||
}
|
||||
H2 {
|
||||
font-size: 120%;
|
||||
}
|
||||
H3 {
|
||||
font-size: 100%;
|
||||
}
|
||||
CAPTION { font-weight: bold }
|
||||
DIV.qindex {
|
||||
width: 100%;
|
||||
background-color: #e8eef2;
|
||||
border: 1px solid #84b0c7;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
line-height: 140%;
|
||||
}
|
||||
DIV.nav {
|
||||
width: 100%;
|
||||
background-color: #e8eef2;
|
||||
border: 1px solid #84b0c7;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
line-height: 140%;
|
||||
}
|
||||
DIV.navtab {
|
||||
background-color: #e8eef2;
|
||||
border: 1px solid #84b0c7;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
margin-right: 15px;
|
||||
padding: 2px;
|
||||
}
|
||||
TD.navtab {
|
||||
font-size: 70%;
|
||||
}
|
||||
A.qindex {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
color: #1A419D;
|
||||
}
|
||||
A.qindex:visited {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
color: #1A419D
|
||||
}
|
||||
A.qindex:hover {
|
||||
text-decoration: none;
|
||||
background-color: #ddddff;
|
||||
}
|
||||
A.qindexHL {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
background-color: #6666cc;
|
||||
color: #ffffff;
|
||||
border: 1px double #9295C2;
|
||||
}
|
||||
A.qindexHL:hover {
|
||||
text-decoration: none;
|
||||
background-color: #6666cc;
|
||||
color: #ffffff;
|
||||
}
|
||||
A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
|
||||
A.el { text-decoration: none; font-weight: bold }
|
||||
A.elRef { font-weight: bold }
|
||||
A.code:link { text-decoration: none; font-weight: normal; color: #0000FF}
|
||||
A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
|
||||
A.codeRef:link { font-weight: normal; color: #0000FF}
|
||||
A.codeRef:visited { font-weight: normal; color: #0000FF}
|
||||
A:hover { text-decoration: none; background-color: #f2f2ff }
|
||||
DL.el { margin-left: -1cm }
|
||||
.fragment {
|
||||
font-family: Fixed, monospace;
|
||||
font-size: 95%;
|
||||
}
|
||||
PRE.fragment {
|
||||
border: 1px solid #CCCCCC;
|
||||
background-color: #f5f5f5;
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
margin-left: 2px;
|
||||
margin-right: 8px;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
|
||||
TD.md { background-color: #F4F4FB; font-weight: bold; }
|
||||
TD.mdPrefix {
|
||||
background-color: #F4F4FB;
|
||||
color: #606060;
|
||||
font-size: 80%;
|
||||
}
|
||||
TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
|
||||
TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
|
||||
DIV.groupHeader {
|
||||
margin-left: 16px;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 6px;
|
||||
font-weight: bold;
|
||||
}
|
||||
DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
|
||||
BODY {
|
||||
background: white;
|
||||
color: black;
|
||||
margin-right: 20px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
TD.indexkey {
|
||||
background-color: #e8eef2;
|
||||
font-weight: bold;
|
||||
padding-right : 10px;
|
||||
padding-top : 2px;
|
||||
padding-left : 10px;
|
||||
padding-bottom : 2px;
|
||||
margin-left : 0px;
|
||||
margin-right : 0px;
|
||||
margin-top : 2px;
|
||||
margin-bottom : 2px;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
TD.indexvalue {
|
||||
background-color: #e8eef2;
|
||||
font-style: italic;
|
||||
padding-right : 10px;
|
||||
padding-top : 2px;
|
||||
padding-left : 10px;
|
||||
padding-bottom : 2px;
|
||||
margin-left : 0px;
|
||||
margin-right : 0px;
|
||||
margin-top : 2px;
|
||||
margin-bottom : 2px;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
TR.memlist {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
P.formulaDsp { text-align: center; }
|
||||
IMG.formulaDsp { }
|
||||
IMG.formulaInl { vertical-align: middle; }
|
||||
SPAN.keyword { color: #008000 }
|
||||
SPAN.keywordtype { color: #604020 }
|
||||
SPAN.keywordflow { color: #e08000 }
|
||||
SPAN.comment { color: #800000 }
|
||||
SPAN.preprocessor { color: #806020 }
|
||||
SPAN.stringliteral { color: #002080 }
|
||||
SPAN.charliteral { color: #008080 }
|
||||
.mdTable {
|
||||
border: 1px solid #868686;
|
||||
background-color: #F4F4FB;
|
||||
}
|
||||
.mdRow {
|
||||
padding: 8px 10px;
|
||||
}
|
||||
.mdescLeft {
|
||||
padding: 0px 8px 4px 8px;
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
background-color: #FAFAFA;
|
||||
border-top: 1px none #E0E0E0;
|
||||
border-right: 1px none #E0E0E0;
|
||||
border-bottom: 1px none #E0E0E0;
|
||||
border-left: 1px none #E0E0E0;
|
||||
margin: 0px;
|
||||
}
|
||||
.mdescRight {
|
||||
padding: 0px 8px 4px 8px;
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
background-color: #FAFAFA;
|
||||
border-top: 1px none #E0E0E0;
|
||||
border-right: 1px none #E0E0E0;
|
||||
border-bottom: 1px none #E0E0E0;
|
||||
border-left: 1px none #E0E0E0;
|
||||
margin: 0px;
|
||||
}
|
||||
.memItemLeft {
|
||||
padding: 1px 0px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: solid;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memItemRight {
|
||||
padding: 1px 8px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: solid;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memTemplItemLeft {
|
||||
padding: 1px 0px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: none;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memTemplItemRight {
|
||||
padding: 1px 8px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: none;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memTemplParams {
|
||||
padding: 1px 0px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: solid;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
color: #606060;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.search { color: #003399;
|
||||
font-weight: bold;
|
||||
}
|
||||
FORM.search {
|
||||
margin-bottom: 0px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
INPUT.search { font-size: 75%;
|
||||
color: #000080;
|
||||
font-weight: normal;
|
||||
background-color: #e8eef2;
|
||||
}
|
||||
TD.tiny { font-size: 75%;
|
||||
}
|
||||
a {
|
||||
color: #1A41A8;
|
||||
}
|
||||
a:visited {
|
||||
color: #2A3798;
|
||||
}
|
||||
.dirtab { padding: 4px;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #84b0c7;
|
||||
}
|
||||
TH.dirtab { background: #e8eef2;
|
||||
font-weight: bold;
|
||||
}
|
||||
HR { height: 1px;
|
||||
border: none;
|
||||
border-top: 1px solid black;
|
||||
}
|
||||
|
||||
BIN
external/protothreads/pt-1.4/doc/html/doxygen.png
vendored
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
external/protothreads/pt-1.4/doc/html/ftv2blank.png
vendored
Normal file
|
After Width: | Height: | Size: 174 B |
BIN
external/protothreads/pt-1.4/doc/html/ftv2doc.png
vendored
Normal file
|
After Width: | Height: | Size: 255 B |
BIN
external/protothreads/pt-1.4/doc/html/ftv2folderclosed.png
vendored
Normal file
|
After Width: | Height: | Size: 259 B |
BIN
external/protothreads/pt-1.4/doc/html/ftv2folderopen.png
vendored
Normal file
|
After Width: | Height: | Size: 261 B |
BIN
external/protothreads/pt-1.4/doc/html/ftv2lastnode.png
vendored
Normal file
|
After Width: | Height: | Size: 233 B |
BIN
external/protothreads/pt-1.4/doc/html/ftv2link.png
vendored
Normal file
|
After Width: | Height: | Size: 358 B |
BIN
external/protothreads/pt-1.4/doc/html/ftv2mlastnode.png
vendored
Normal file
|
After Width: | Height: | Size: 160 B |
BIN
external/protothreads/pt-1.4/doc/html/ftv2mnode.png
vendored
Normal file
|
After Width: | Height: | Size: 194 B |
BIN
external/protothreads/pt-1.4/doc/html/ftv2node.png
vendored
Normal file
|
After Width: | Height: | Size: 235 B |
BIN
external/protothreads/pt-1.4/doc/html/ftv2plastnode.png
vendored
Normal file
|
After Width: | Height: | Size: 165 B |
BIN
external/protothreads/pt-1.4/doc/html/ftv2pnode.png
vendored
Normal file
|
After Width: | Height: | Size: 200 B |
BIN
external/protothreads/pt-1.4/doc/html/ftv2vertline.png
vendored
Normal file
|
After Width: | Height: | Size: 229 B |
43
external/protothreads/pt-1.4/doc/html/index.hhc
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
||||
<HTML><HEAD></HEAD><BODY>
|
||||
<OBJECT type="text/site properties">
|
||||
<param name="FrameName" value="right">
|
||||
</OBJECT>
|
||||
<UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="The Protothreads Library"><param name="Local" value="main.html"><param name="ImageNumber" value="11"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="File List"><param name="Local" value="files.html"><param name="ImageNumber" value="1"></OBJECT>
|
||||
<UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="lc-addrlabels.h"><param name="Local" value="a00009.html"><param name="ImageNumber" value="11"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="lc-switch.h"><param name="Local" value="a00010.html"><param name="ImageNumber" value="11"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="lc.h"><param name="Local" value="a00011.html"><param name="ImageNumber" value="11"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="pt-sem.h"><param name="Local" value="a00012.html"><param name="ImageNumber" value="11"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="pt.h"><param name="Local" value="a00013.html"><param name="ImageNumber" value="11"></OBJECT>
|
||||
</UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="Data Structures"><param name="Local" value="annotated.html"><param name="ImageNumber" value="1"></OBJECT>
|
||||
<UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="pt"><param name="Local" value="a00005.html"><param name="ImageNumber" value="11"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="pt_sem"><param name="Local" value="a00006.html"><param name="ImageNumber" value="11"></OBJECT>
|
||||
</UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="Class Hierarchy"><param name="Local" value="hierarchy.html"><param name="ImageNumber" value="1"></OBJECT>
|
||||
<UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="pt"><param name="Local" value="a00005.html"><param name="ImageNumber" value="11"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="pt_sem"><param name="Local" value="a00006.html"><param name="ImageNumber" value="11"></OBJECT>
|
||||
</UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="Data Fields"><param name="Local" value="functions.html"><param name="ImageNumber" value="11"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="Modules"><param name="Local" value="modules.html"><param name="ImageNumber" value="1"></OBJECT>
|
||||
<UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="Protothreads"><param name="Local" value="a00014.html"><param name="ImageNumber" value="1"></OBJECT>
|
||||
<UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="Protothread semaphores"><param name="Local" value="a00016.html"><param name="ImageNumber" value="11"></OBJECT>
|
||||
<UL>
|
||||
</UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="Local continuations"><param name="Local" value="a00017.html"><param name="ImageNumber" value="11"></OBJECT>
|
||||
<UL>
|
||||
</UL>
|
||||
</UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="Examples"><param name="Local" value="a00015.html"><param name="ImageNumber" value="11"></OBJECT>
|
||||
<UL>
|
||||
</UL>
|
||||
</UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Name" value="Globals"><param name="Local" value="globals.html"><param name="ImageNumber" value="11"></OBJECT>
|
||||
</UL>
|
||||
56
external/protothreads/pt-1.4/doc/html/index.hhk
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
||||
<HTML><HEAD></HEAD><BODY>
|
||||
<OBJECT type="text/site properties">
|
||||
<param name="FrameName" value="right">
|
||||
</OBJECT>
|
||||
<UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00017.html#g3d76802e55349cc8bf74f286ced203c3"><param name="Name" value="LC_END"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00017.html#g9ca9d0fef02b9c5d93bed2834e7aeb76"><param name="Name" value="LC_INIT"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00017.html#g33dad6011c98dfeb4e64fee1d6892cb3"><param name="Name" value="LC_RESUME"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00017.html#gfb1d5e671e40464a7a7bda589b5d4341"><param name="Name" value="LC_SET"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00017.html"><param name="Name" value="Local continuations"></OBJECT>
|
||||
<UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00017.html#g3d76802e55349cc8bf74f286ced203c3"><param name="Name" value="LC_END"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00017.html#g9ca9d0fef02b9c5d93bed2834e7aeb76"><param name="Name" value="LC_INIT"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00017.html#g33dad6011c98dfeb4e64fee1d6892cb3"><param name="Name" value="LC_RESUME"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00017.html#gfb1d5e671e40464a7a7bda589b5d4341"><param name="Name" value="LC_SET"></OBJECT>
|
||||
</UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00016.html"><param name="Name" value="Protothread semaphores"></OBJECT>
|
||||
<UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00016.html#gd7089c5dc86f12019f0361d82a75b04b"><param name="Name" value="PT_SEM_INIT"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00016.html#g1eaaf4d9d75e24582acc6440d7085f19"><param name="Name" value="PT_SEM_SIGNAL"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00016.html#g386ff87a52a840512906f2940e229e2e"><param name="Name" value="PT_SEM_WAIT"></OBJECT>
|
||||
</UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html"><param name="Name" value="Protothreads"></OBJECT>
|
||||
<UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#g2ffbb9e554e08a343ae2f9de4bedfdfc"><param name="Name" value="PT_BEGIN"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#g7b04a0035bef29d905496c23bae066d2"><param name="Name" value="PT_END"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#g905451249dca72ce0385bf2a9ff178ee"><param name="Name" value="PT_EXIT"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#ge6bae7dc0225468c8a5ac269df549892"><param name="Name" value="PT_INIT"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#gcd3ac045f0a4ae63412e3b3d8780e8ab"><param name="Name" value="PT_RESTART"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#gfa82b860a64b67d25ab3abc21811896f"><param name="Name" value="PT_SCHEDULE"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#g9e97a0b4d5cc7764d8e19758f5da53ae"><param name="Name" value="PT_SPAWN"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#g3d4c8bd4aada659eb34f5d2ffd3e7901"><param name="Name" value="PT_THREAD"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#g2f8f70c30b9ee08a103fbd69a4365c4c"><param name="Name" value="PT_WAIT_THREAD"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#g99e43010ec61327164466aa2d902de45"><param name="Name" value="PT_WAIT_UNTIL"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#gad14bbbf092b90aa0a5a4f9169504a8d"><param name="Name" value="PT_WAIT_WHILE"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#g155cba6121323726d02c00284428fed6"><param name="Name" value="PT_YIELD"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#ge3c821e3a388615528efda9d23c7d115"><param name="Name" value="PT_YIELD_UNTIL"></OBJECT>
|
||||
</UL>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#g2ffbb9e554e08a343ae2f9de4bedfdfc"><param name="Name" value="PT_BEGIN"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#g7b04a0035bef29d905496c23bae066d2"><param name="Name" value="PT_END"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#g905451249dca72ce0385bf2a9ff178ee"><param name="Name" value="PT_EXIT"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#ge6bae7dc0225468c8a5ac269df549892"><param name="Name" value="PT_INIT"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#gcd3ac045f0a4ae63412e3b3d8780e8ab"><param name="Name" value="PT_RESTART"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#gfa82b860a64b67d25ab3abc21811896f"><param name="Name" value="PT_SCHEDULE"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00016.html#gd7089c5dc86f12019f0361d82a75b04b"><param name="Name" value="PT_SEM_INIT"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00016.html#g1eaaf4d9d75e24582acc6440d7085f19"><param name="Name" value="PT_SEM_SIGNAL"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00016.html#g386ff87a52a840512906f2940e229e2e"><param name="Name" value="PT_SEM_WAIT"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#g9e97a0b4d5cc7764d8e19758f5da53ae"><param name="Name" value="PT_SPAWN"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#g3d4c8bd4aada659eb34f5d2ffd3e7901"><param name="Name" value="PT_THREAD"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#g2f8f70c30b9ee08a103fbd69a4365c4c"><param name="Name" value="PT_WAIT_THREAD"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#g99e43010ec61327164466aa2d902de45"><param name="Name" value="PT_WAIT_UNTIL"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#gad14bbbf092b90aa0a5a4f9169504a8d"><param name="Name" value="PT_WAIT_WHILE"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#g155cba6121323726d02c00284428fed6"><param name="Name" value="PT_YIELD"></OBJECT>
|
||||
<LI><OBJECT type="text/sitemap"><param name="Local" value="a00014.html#ge3c821e3a388615528efda9d23c7d115"><param name="Name" value="PT_YIELD_UNTIL"></OBJECT>
|
||||
</UL>
|
||||
44
external/protothreads/pt-1.4/doc/html/index.hhp
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
[OPTIONS]
|
||||
Compatibility=1.1
|
||||
Full-text search=Yes
|
||||
Contents file=index.hhc
|
||||
Default Window=main
|
||||
Default topic=main.html
|
||||
Index file=index.hhk
|
||||
Language=0x409 English (United States)
|
||||
Title=The Protothreads Library 1.4
|
||||
|
||||
[WINDOWS]
|
||||
main="The Protothreads Library 1.4","index.hhc","index.hhk","main.html","main.html",,,,,0x23520,,0x387e,,,,,,,,0
|
||||
|
||||
[FILES]
|
||||
main.html
|
||||
files.html
|
||||
a00018.html
|
||||
a00019.html
|
||||
a00020.html
|
||||
a00021.html
|
||||
a00022.html
|
||||
a00009.html
|
||||
a00010.html
|
||||
a00011.html
|
||||
a00012.html
|
||||
a00013.html
|
||||
annotated.html
|
||||
hierarchy.html
|
||||
functions.html
|
||||
functions_vars.html
|
||||
a00005.html
|
||||
a00006.html
|
||||
a00014.html
|
||||
a00015.html
|
||||
a00016.html
|
||||
a00017.html
|
||||
modules.html
|
||||
globals.html
|
||||
globals_type.html
|
||||
globals_defs.html
|
||||
tabs.css
|
||||
tab_b.gif
|
||||
tab_l.gif
|
||||
tab_r.gif
|
||||
BIN
external/protothreads/pt-1.4/doc/html/tab_b.gif
vendored
Normal file
|
After Width: | Height: | Size: 35 B |
BIN
external/protothreads/pt-1.4/doc/html/tab_l.gif
vendored
Normal file
|
After Width: | Height: | Size: 706 B |
BIN
external/protothreads/pt-1.4/doc/html/tab_r.gif
vendored
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
102
external/protothreads/pt-1.4/doc/html/tabs.css
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */
|
||||
|
||||
DIV.tabs
|
||||
{
|
||||
float : left;
|
||||
width : 100%;
|
||||
background : url("tab_b.gif") repeat-x bottom;
|
||||
margin-bottom : 4px;
|
||||
}
|
||||
|
||||
DIV.tabs UL
|
||||
{
|
||||
margin : 0px;
|
||||
padding-left : 10px;
|
||||
list-style : none;
|
||||
}
|
||||
|
||||
DIV.tabs LI, DIV.tabs FORM
|
||||
{
|
||||
display : inline;
|
||||
margin : 0px;
|
||||
padding : 0px;
|
||||
}
|
||||
|
||||
DIV.tabs FORM
|
||||
{
|
||||
float : right;
|
||||
}
|
||||
|
||||
DIV.tabs A
|
||||
{
|
||||
float : left;
|
||||
background : url("tab_r.gif") no-repeat right top;
|
||||
border-bottom : 1px solid #84B0C7;
|
||||
font-size : x-small;
|
||||
font-weight : bold;
|
||||
text-decoration : none;
|
||||
}
|
||||
|
||||
DIV.tabs A:hover
|
||||
{
|
||||
background-position: 100% -150px;
|
||||
}
|
||||
|
||||
DIV.tabs A:link, DIV.tabs A:visited,
|
||||
DIV.tabs A:active, DIV.tabs A:hover
|
||||
{
|
||||
color: #1A419D;
|
||||
}
|
||||
|
||||
DIV.tabs SPAN
|
||||
{
|
||||
float : left;
|
||||
display : block;
|
||||
background : url("tab_l.gif") no-repeat left top;
|
||||
padding : 5px 9px;
|
||||
white-space : nowrap;
|
||||
}
|
||||
|
||||
DIV.tabs INPUT
|
||||
{
|
||||
float : right;
|
||||
display : inline;
|
||||
font-size : 1em;
|
||||
}
|
||||
|
||||
DIV.tabs TD
|
||||
{
|
||||
font-size : x-small;
|
||||
font-weight : bold;
|
||||
text-decoration : none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Commented Backslash Hack hides rule from IE5-Mac \*/
|
||||
DIV.tabs SPAN {float : none;}
|
||||
/* End IE5-Mac hack */
|
||||
|
||||
DIV.tabs A:hover SPAN
|
||||
{
|
||||
background-position: 0% -150px;
|
||||
}
|
||||
|
||||
DIV.tabs LI#current A
|
||||
{
|
||||
background-position: 100% -150px;
|
||||
border-width : 0px;
|
||||
}
|
||||
|
||||
DIV.tabs LI#current SPAN
|
||||
{
|
||||
background-position: 0% -150px;
|
||||
padding-bottom : 6px;
|
||||
}
|
||||
|
||||
DIV.nav
|
||||
{
|
||||
background : none;
|
||||
border : none;
|
||||
border-bottom : 1px solid #84B0C7;
|
||||
}
|
||||
58
external/protothreads/pt-1.4/doc/pt-doc.txt
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
\defgroup pt Protothreads
|
||||
@{
|
||||
Protothreads are implemented in a single header file, pt.h, which
|
||||
includes the local continuations header file, lc.h. This file in turn
|
||||
includes the actual implementation of local continuations, which
|
||||
typically also is contained in a single header file.
|
||||
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
\defgroup examples Examples
|
||||
@{
|
||||
|
||||
\section example-small A small example
|
||||
|
||||
This first example shows a very simple program: two protothreads
|
||||
waiting for each other to toggle two flags. The code illustrates how
|
||||
to write protothreads code, how to initialize protothreads, and how to
|
||||
schedule them.
|
||||
|
||||
\include example-small.c
|
||||
|
||||
|
||||
\section example-code-lock A code-lock
|
||||
This example shows how to implement a simple code lock - the kind of
|
||||
device that is placed next to doors and that you have to push a four
|
||||
digit number into in order to unlock the door.
|
||||
|
||||
The code lock waits for key presses from a numeric keyboard and if the
|
||||
correct code is entered, the lock is unlocked. There is a maximum time
|
||||
of one second between each key press, and after the correct code has
|
||||
been entered, no more keys must be pressed for 0.5 seconds before the
|
||||
lock is opened.
|
||||
|
||||
\include example-codelock.c
|
||||
|
||||
\section example-buffer The bounded buffer with protothread semaphores
|
||||
|
||||
The following example shows how to implement the bounded buffer
|
||||
problem using the protothreads semaphore library. The example uses
|
||||
three protothreads: one producer() protothread that produces items,
|
||||
one consumer() protothread that consumes items, and one
|
||||
driver_thread() that schedules the producer and consumer protothreads.
|
||||
|
||||
Note that there is no need for a mutex to guard the add_to_buffer()
|
||||
and get_from_buffer() functions because of the implicit locking
|
||||
semantics of protothreads - a protothread will never be preempted and
|
||||
will never block except in an explicit PT_WAIT statement.
|
||||
|
||||
\include example-buffer.c
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/** @} */
|
||||
156
external/protothreads/pt-1.4/doc/pt-mainpage.txt
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
/**
|
||||
|
||||
\mainpage The Protothreads Library
|
||||
|
||||
\author Adam Dunkels <adam@sics.se>
|
||||
|
||||
Protothreads are a type of lightweight stackless threads designed for
|
||||
severly memory constrained systems such as deeply embedded systems or
|
||||
sensor network nodes. Protothreads provides linear code execution for
|
||||
event-driven systems implemented in C. Protothreads can be used with
|
||||
or without an RTOS.
|
||||
|
||||
Protothreads are a extremely lightweight, stackless type of threads
|
||||
that provides a blocking context on top of an event-driven system,
|
||||
without the overhead of per-thread stacks. The purpose of protothreads
|
||||
is to implement sequential flow of control without complex state
|
||||
machines or full multi-threading. Protothreads provides conditional
|
||||
blocking inside C functions.
|
||||
|
||||
Main features:
|
||||
|
||||
- No machine specific code - the protothreads library is pure C
|
||||
|
||||
- Does not use error-prone functions such as longjmp()
|
||||
|
||||
- Very small RAM overhead - only two bytes per protothread
|
||||
|
||||
- Can be used with or without an OS
|
||||
|
||||
- Provides blocking wait without full multi-threading or
|
||||
stack-switching
|
||||
|
||||
Examples applications:
|
||||
|
||||
- Memory constrained systems
|
||||
|
||||
- Event-driven protocol stacks
|
||||
|
||||
- Deeply embedded systems
|
||||
|
||||
- Sensor network nodes
|
||||
|
||||
|
||||
\sa \ref examples "Example programs"
|
||||
\sa \ref pt "Protothreads API documentation"
|
||||
|
||||
The protothreads library is released under a BSD-style license that
|
||||
allows for both non-commercial and commercial usage. The only
|
||||
requirement is that credit is given.
|
||||
|
||||
More information and new version of the code can be found at the
|
||||
Protothreads homepage:
|
||||
|
||||
http://www.sics.se/~adam/pt/
|
||||
|
||||
\section authors Authors
|
||||
|
||||
The protothreads library was written by Adam Dunkels <adam@sics.se>
|
||||
with support from Oliver Schmidt <ol.sc@web.de>.
|
||||
|
||||
\section using Using protothreads
|
||||
|
||||
Using protothreads in a project is easy: simply copy the files pt.h,
|
||||
lc.h and lc-switch.h into the include files directory of the project,
|
||||
and \#include "pt.h" in all files that should use protothreads.
|
||||
|
||||
\section pt-desc Protothreads
|
||||
|
||||
Protothreads are a extremely lightweight, stackless threads that
|
||||
provides a blocking context on top of an event-driven system, without
|
||||
the overhead of per-thread stacks. The purpose of protothreads is to
|
||||
implement sequential flow of control without using complex state
|
||||
machines or full multi-threading. Protothreads provides conditional
|
||||
blocking inside a C function.
|
||||
|
||||
In memory constrained systems, such as deeply embedded systems,
|
||||
traditional multi-threading may have a too large memory overhead. In
|
||||
traditional multi-threading, each thread requires its own stack, that
|
||||
typically is over-provisioned. The stacks may use large parts of the
|
||||
available memory.
|
||||
|
||||
The main advantage of protothreads over ordinary threads is that
|
||||
protothreads are very lightweight: a protothread does not require its
|
||||
own stack. Rather, all protothreads run on the same stack and context
|
||||
switching is done by stack rewinding. This is advantageous in memory
|
||||
constrained systems, where a stack for a thread might use a large part
|
||||
of the available memory. A protothread only requires only two bytes of
|
||||
memory per protothread. Moreover, protothreads are implemented in pure
|
||||
C and do not require any machine-specific assembler code.
|
||||
|
||||
A protothread runs within a single C function and cannot span over
|
||||
other functions. A protothread may call normal C functions, but cannot
|
||||
block inside a called function. Blocking inside nested function calls
|
||||
is instead made by spawning a separate protothread for each
|
||||
potentially blocking function. The advantage of this approach is that
|
||||
blocking is explicit: the programmer knows exactly which functions
|
||||
that block that which functions the never blocks.
|
||||
|
||||
Protothreads are similar to asymmetric co-routines. The main
|
||||
difference is that co-routines uses a separate stack for each
|
||||
co-routine, whereas protothreads are stackless. The most similar
|
||||
mechanism to protothreads are Python generators. These are also
|
||||
stackless constructs, but have a different purpose. Protothreads
|
||||
provides blocking contexts inside a C function, whereas Python
|
||||
generators provide multiple exit points from a generator function.
|
||||
|
||||
\section pt-autovars Local variables
|
||||
|
||||
\note
|
||||
Because protothreads do not save the stack context across a blocking
|
||||
call, local variables are not preserved when the protothread
|
||||
blocks. This means that local variables should be used with utmost
|
||||
care - if in doubt, do not use local variables inside a protothread!
|
||||
|
||||
\section pt-scheduling Scheduling
|
||||
|
||||
A protothread is driven by repeated calls to the function in which the
|
||||
protothread is running. Each time the function is called, the
|
||||
protothread will run until it blocks or exits. Thus the scheduling of
|
||||
protothreads is done by the application that uses protothreads.
|
||||
|
||||
\section pt-impl Implementation
|
||||
|
||||
Protothreads are implemented using local continuations. A local
|
||||
continuation represents the current state of execution at a particular
|
||||
place in the program, but does not provide any call history or local
|
||||
variables. 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.
|
||||
|
||||
|
||||
Local continuations can be implemented in a variety of ways:
|
||||
|
||||
-# by using machine specific assembler code,
|
||||
-# by using standard C constructs, or
|
||||
-# by using compiler extensions.
|
||||
|
||||
The first way works by saving and restoring the processor state,
|
||||
except for stack pointers, and requires between 16 and 32 bytes of
|
||||
memory per protothread. The exact amount of memory required depends on
|
||||
the architecture.
|
||||
|
||||
The standard C implementation requires only two bytes of state per
|
||||
protothread and utilizes the C switch() statement in a non-obvious way
|
||||
that is similar to Duff's device. This implementation does, however,
|
||||
impose a slight restriction to the code that uses protothreads: a
|
||||
protothread cannot perform a blocking wait (PT_WAIT_UNTIL() or
|
||||
PT_YIELD()) inside a switch() statement.
|
||||
|
||||
Certain compilers has C extensions that can be used to implement
|
||||
protothreads. GCC supports label pointers that can be used for this
|
||||
purpose. With this implementation, protothreads require 4 bytes of RAM
|
||||
per protothread.
|
||||
|
||||
*/
|
||||