|
pfcn.h |
|
|---|---|
|
|
/*
* pfcn.h
*
* ------------------------------------------------------------
* A Kla2 Module
* Copyright (c) 2003, David Clifton
* All Rights Reserved
* http://www.codelode.com
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice, website reference, this permission
* notice, and the disclaimer of warranty below shall be included
* in all copies, derivatives, or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
* -------------------------------------------------------------
*
* Method declarations for
* the prioritized function module
*
*/
#ifndef PFCN_H
#define PFCN_H
/*
* Permissable values for priority
* (priority must be an integer which
* takes on only values between 0
* and (SYSMAX_PRIORITIES-1) inclusive )
*/
#define PRIORITY_0 (0)
#define PRIORITY_1 (1)
#define PRIORITY_2 (2)
#define PRIORITY_3 (3)
#define PRIORITY_4 (4)
#define PRIORITY_5 (5)
#define PRIORITY_6 (6)
#define PRIORITY_7 (7)
#define PRIORITY_8 (8)
#define PRIORITY_9 (9)
#define PRIORITY_10 (10)
#define PRIORITY_11 (11)
#define PRIORITY_12 (12)
#define PRIORITY_13 (13)
#define PRIORITY_14 (14)
#define PRIORITY_15 (15)
/*
* Public method definitions
*/
void Pfcn_init(void);
s16 Pfcn_new(s16 pri,void (*pfcn)(void));
void Pfcn_post(s16 pfcnindex);
s16 Pfcn_priority(s16 pfcnindex);
s16 Pfcn_current(void);
#endif
|