ISIX-RTOS - small operating system for ARM microcontrollers 1.2

multiple_objects.h

Go to the documentation of this file.
00001 /*--------------------------------------------------------------*/
00002 /*
00003  * multiple_objects.h
00004  *
00005  *  Created on: 26-03-2011
00006  *      Author: lucck
00007  */
00008 /*--------------------------------------------------------------*/
00009 #ifndef ISIX_PRV_MULTIPLE_OBJECTS_H_
00010 #define ISIX_PRV_MULTIPLE_OBJECTS_H_
00011 /*--------------------------------------------------------------*/
00012 
00013 #ifdef ISIX_CONFIG_USE_MULTIOBJECTS     //If multiobjects enable
00014 
00015 /*--------------------------------------------------------------*/
00016 #include <isix/types.h>
00017 #include <isix/scheduler.h>
00018 
00019 /*--------------------------------------------------------------*/
00020 struct multiple_obj
00021 {
00022         const union ihandle *ihwnd;     //Ihandle pointer
00023         size_t ihwnd_len;               //Ihandle len
00024         task_t *task_id;                //Task owner
00025         list_t inode;                   //Multiple objects inode
00026 };
00027 
00028 /*--------------------------------------------------------------*/
00029 //Wait for multi object
00030 typedef struct multiple_obj multiple_obj_t;
00031 
00032 
00033 /*--------------------------------------------------------------*/
00034 //Initialize the multiple objects waiting
00035 void ixixp_multiple_objects_init( void );
00036 
00037 /*--------------------------------------------------------------*/
00038 //Wakeup multiple wating tasks
00039 int isixp_wakeup_multiple_waiting_tasks( const sem_t *sem, int (*wkup_fun)(task_t *) );
00040 
00041 /*--------------------------------------------------------------*/
00042 
00043 void isixp_delete_from_multiple_wait_list(const task_t *task );
00044 
00045 /*--------------------------------------------------------------*/
00046 #else /*ISIX_CONFIG_USE_MULTIOBJECTS */
00047 
00048 static inline void ixixp_multiple_objects_init( void ) {}
00049 
00050 #endif /*ISIX_CONFIG_USE_MULTIOBJECTS */
00051 
00052 #endif /* MULTIPLE_OBJECTS_H_ */
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines