dol: initial dol commit
[jump.git] / dol / src / dol / visitor / cbe / lib / common_ppu.h
1 /**************************************************************** \r
2  *      Common structs for the PPU\r
3  *      Creator: lschor, 2008-11-21\r
4  *      Description: Common structs for the PPU\r
5  *      \r
6  *      Revision: \r
7  *      - 2008-11-21: Created\r
8  */\r
9 \r
10 #ifndef __COMMON_PPU_H__\r
11 #define __COMMON_PPU_H__\r
12 \r
13 //DOL macros\r
14 #define GETINDEX(dimension) \\r
15     ((ProcessWrapper*)(p->wptr))->index[dimension]\r
16 \r
17 #define CREATEPORTVAR(name) \\r
18     int name\r
19 \r
20 #define CREATEPORT(port, base, number_of_indices, index_range_pairs...) \\r
21     createPort(&port, base, number_of_indices, index_range_pairs)\r
22 \r
23 \r
24 // Struct for a process\r
25 typedef struct _process_wrapper {\r
26     char*                                       name;\r
27     uint32_t*                           index;\r
28     uint32_t                            is_detached;\r
29     volatile uint32_t*      port_id;\r
30     volatile uint32_t*      port_queue_id;\r
31     uint32_t                            number_of_ports;\r
32         char **                                 locBuf;\r
33         int *                                   locBufCount;\r
34         int *                                   locBufStart;\r
35         int                                     MAXELEMENT;\r
36         int *                                   processFinished;\r
37         pthread_mutex_t *               mutex;\r
38         pthread_mutex_t *               mutexProcessNr;\r
39 } ProcessWrapper;\r
40 \r
41 #endif\r