ISIX-RTOS - small operating system for ARM microcontrollers 1.2

ihandle.h

Go to the documentation of this file.
00001 /*
00002  * ihandle.h
00003  *
00004  *  Created on: 27-03-2011
00005  *      Author: lucck
00006  */
00007 
00008 #ifndef ISIX_IHANDLE_H_
00009 #define ISIX_IHANDLE_H_
00010 
00011 /*--------------------------------------------------------------*/
00012 #ifdef __cplusplus
00013 namespace isix {
00014 #endif
00015 /*--------------------------------------------------------------*/
00016 //Universal handle for multiple objs
00017 union ihandle
00018 {
00019 #ifdef __cplusplus
00020         ihandle(const sem_t *sem_) : sem(sem_) {}
00021         ihandle(const fifo_t *fifo_) : fifo(fifo_) {}
00022         ihandle(const semaphore &sem_) : sem(sem_.sem) {}
00023         ihandle(const fifo_base &fifo_) : fifo(fifo_.hwnd) {}
00024 private:
00025 #endif
00026         const sem_t *sem;
00027         const fifo_t *fifo;
00028 };
00029 /*--------------------------------------------------------------*/
00030 typedef union ihandle ihandle_t;
00031 /*--------------------------------------------------------------*/
00032 #ifdef __cplusplus
00033 }
00034 #endif
00035 
00036 /*--------------------------------------------------------------*/
00037 #endif /* IHANDLE_H_ */
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines