Steven He / Mbed 2 deprecated StringMatchingProtothread

Dependencies:   mbed

Committer:
StevenHe
Date:
Wed Dec 01 04:39:00 2010 +0000
Revision:
0:544b5f6ad832

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
StevenHe 0:544b5f6ad832 1 /*
StevenHe 0:544b5f6ad832 2 * Copyright (c) 2004-2005, Swedish Institute of Computer Science.
StevenHe 0:544b5f6ad832 3 * All rights reserved.
StevenHe 0:544b5f6ad832 4 *
StevenHe 0:544b5f6ad832 5 * Redistribution and use in source and binary forms, with or without
StevenHe 0:544b5f6ad832 6 * modification, are permitted provided that the following conditions
StevenHe 0:544b5f6ad832 7 * are met:
StevenHe 0:544b5f6ad832 8 * 1. Redistributions of source code must retain the above copyright
StevenHe 0:544b5f6ad832 9 * notice, this list of conditions and the following disclaimer.
StevenHe 0:544b5f6ad832 10 * 2. Redistributions in binary form must reproduce the above copyright
StevenHe 0:544b5f6ad832 11 * notice, this list of conditions and the following disclaimer in the
StevenHe 0:544b5f6ad832 12 * documentation and/or other materials provided with the distribution.
StevenHe 0:544b5f6ad832 13 * 3. Neither the name of the Institute nor the names of its contributors
StevenHe 0:544b5f6ad832 14 * may be used to endorse or promote products derived from this software
StevenHe 0:544b5f6ad832 15 * without specific prior written permission.
StevenHe 0:544b5f6ad832 16 *
StevenHe 0:544b5f6ad832 17 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
StevenHe 0:544b5f6ad832 18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
StevenHe 0:544b5f6ad832 19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
StevenHe 0:544b5f6ad832 20 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
StevenHe 0:544b5f6ad832 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
StevenHe 0:544b5f6ad832 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
StevenHe 0:544b5f6ad832 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
StevenHe 0:544b5f6ad832 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
StevenHe 0:544b5f6ad832 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
StevenHe 0:544b5f6ad832 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
StevenHe 0:544b5f6ad832 27 * SUCH DAMAGE.
StevenHe 0:544b5f6ad832 28 *
StevenHe 0:544b5f6ad832 29 * This file is part of the protothreads library.
StevenHe 0:544b5f6ad832 30 *
StevenHe 0:544b5f6ad832 31 * Author: Adam Dunkels <adam@sics.se>
StevenHe 0:544b5f6ad832 32 *
StevenHe 0:544b5f6ad832 33 * $Id: lc.h,v 1.2 2005/02/24 10:36:59 adam Exp $
StevenHe 0:544b5f6ad832 34 */
StevenHe 0:544b5f6ad832 35
StevenHe 0:544b5f6ad832 36 /**
StevenHe 0:544b5f6ad832 37 * \addtogroup pt
StevenHe 0:544b5f6ad832 38 * @{
StevenHe 0:544b5f6ad832 39 */
StevenHe 0:544b5f6ad832 40
StevenHe 0:544b5f6ad832 41 /**
StevenHe 0:544b5f6ad832 42 * \defgroup lc Local continuations
StevenHe 0:544b5f6ad832 43 * @{
StevenHe 0:544b5f6ad832 44 *
StevenHe 0:544b5f6ad832 45 * Local continuations form the basis for implementing protothreads. A
StevenHe 0:544b5f6ad832 46 * local continuation can be <i>set</i> in a specific function to
StevenHe 0:544b5f6ad832 47 * capture the state of the function. After a local continuation has
StevenHe 0:544b5f6ad832 48 * been set can be <i>resumed</i> in order to restore the state of the
StevenHe 0:544b5f6ad832 49 * function at the point where the local continuation was set.
StevenHe 0:544b5f6ad832 50 *
StevenHe 0:544b5f6ad832 51 *
StevenHe 0:544b5f6ad832 52 */
StevenHe 0:544b5f6ad832 53
StevenHe 0:544b5f6ad832 54 /**
StevenHe 0:544b5f6ad832 55 * \file lc.h
StevenHe 0:544b5f6ad832 56 * Local continuations
StevenHe 0:544b5f6ad832 57 * \author
StevenHe 0:544b5f6ad832 58 * Adam Dunkels <adam@sics.se>
StevenHe 0:544b5f6ad832 59 *
StevenHe 0:544b5f6ad832 60 */
StevenHe 0:544b5f6ad832 61
StevenHe 0:544b5f6ad832 62 #ifdef DOXYGEN
StevenHe 0:544b5f6ad832 63 /**
StevenHe 0:544b5f6ad832 64 * Initialize a local continuation.
StevenHe 0:544b5f6ad832 65 *
StevenHe 0:544b5f6ad832 66 * This operation initializes the local continuation, thereby
StevenHe 0:544b5f6ad832 67 * unsetting any previously set continuation state.
StevenHe 0:544b5f6ad832 68 *
StevenHe 0:544b5f6ad832 69 * \hideinitializer
StevenHe 0:544b5f6ad832 70 */
StevenHe 0:544b5f6ad832 71 #define LC_INIT(lc)
StevenHe 0:544b5f6ad832 72
StevenHe 0:544b5f6ad832 73 /**
StevenHe 0:544b5f6ad832 74 * Set a local continuation.
StevenHe 0:544b5f6ad832 75 *
StevenHe 0:544b5f6ad832 76 * The set operation saves the state of the function at the point
StevenHe 0:544b5f6ad832 77 * where the operation is executed. As far as the set operation is
StevenHe 0:544b5f6ad832 78 * concerned, the state of the function does <b>not</b> include the
StevenHe 0:544b5f6ad832 79 * call-stack or local (automatic) variables, but only the program
StevenHe 0:544b5f6ad832 80 * counter and such CPU registers that needs to be saved.
StevenHe 0:544b5f6ad832 81 *
StevenHe 0:544b5f6ad832 82 * \hideinitializer
StevenHe 0:544b5f6ad832 83 */
StevenHe 0:544b5f6ad832 84 #define LC_SET(lc)
StevenHe 0:544b5f6ad832 85
StevenHe 0:544b5f6ad832 86 /**
StevenHe 0:544b5f6ad832 87 * Resume a local continuation.
StevenHe 0:544b5f6ad832 88 *
StevenHe 0:544b5f6ad832 89 * The resume operation resumes a previously set local continuation, thus
StevenHe 0:544b5f6ad832 90 * restoring the state in which the function was when the local
StevenHe 0:544b5f6ad832 91 * continuation was set. If the local continuation has not been
StevenHe 0:544b5f6ad832 92 * previously set, the resume operation does nothing.
StevenHe 0:544b5f6ad832 93 *
StevenHe 0:544b5f6ad832 94 * \hideinitializer
StevenHe 0:544b5f6ad832 95 */
StevenHe 0:544b5f6ad832 96 #define LC_RESUME(lc)
StevenHe 0:544b5f6ad832 97
StevenHe 0:544b5f6ad832 98 /**
StevenHe 0:544b5f6ad832 99 * Mark the end of local continuation usage.
StevenHe 0:544b5f6ad832 100 *
StevenHe 0:544b5f6ad832 101 * The end operation signifies that local continuations should not be
StevenHe 0:544b5f6ad832 102 * used any more in the function. This operation is not needed for
StevenHe 0:544b5f6ad832 103 * most implementations of local continuation, but is required by a
StevenHe 0:544b5f6ad832 104 * few implementations.
StevenHe 0:544b5f6ad832 105 *
StevenHe 0:544b5f6ad832 106 * \hideinitializer
StevenHe 0:544b5f6ad832 107 */
StevenHe 0:544b5f6ad832 108 #define LC_END(lc)
StevenHe 0:544b5f6ad832 109
StevenHe 0:544b5f6ad832 110 /**
StevenHe 0:544b5f6ad832 111 * \var typedef lc_t;
StevenHe 0:544b5f6ad832 112 *
StevenHe 0:544b5f6ad832 113 * The local continuation type.
StevenHe 0:544b5f6ad832 114 *
StevenHe 0:544b5f6ad832 115 * \hideinitializer
StevenHe 0:544b5f6ad832 116 */
StevenHe 0:544b5f6ad832 117 #endif /* DOXYGEN */
StevenHe 0:544b5f6ad832 118
StevenHe 0:544b5f6ad832 119 #ifndef __LC_H__
StevenHe 0:544b5f6ad832 120 #define __LC_H__
StevenHe 0:544b5f6ad832 121
StevenHe 0:544b5f6ad832 122
StevenHe 0:544b5f6ad832 123 #ifdef LC_INCLUDE
StevenHe 0:544b5f6ad832 124 #include LC_INCLUDE
StevenHe 0:544b5f6ad832 125 #else
StevenHe 0:544b5f6ad832 126 #include "lc-switch.h"
StevenHe 0:544b5f6ad832 127 #endif /* LC_INCLUDE */
StevenHe 0:544b5f6ad832 128
StevenHe 0:544b5f6ad832 129 #endif /* __LC_H__ */
StevenHe 0:544b5f6ad832 130
StevenHe 0:544b5f6ad832 131 /** @} */
StevenHe 0:544b5f6ad832 132 /** @} */