-
Notifications
You must be signed in to change notification settings - Fork 0
/
activityObject.h
44 lines (35 loc) · 1.33 KB
/
activityObject.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* Copyright (C) 2010,2011 by Milan Kazarka
*
* You may distribute under the terms of the Artistic License,
* as specified in the README file.
*
*/
#ifndef _ACTIVITY_OBJECT_
#define _ACTIVITY_OBJECT_
#include "activity.h"
#include "config.h"
#define _ACTIVITY_OBJECTS_STORAGE 4096*10
typedef struct activityObjects
{
rootShm *shm;
rootSem *sem;
} activityObjects;
typedef struct activityObject
{
unsigned char active; // 0x01/0x02
int size; // 02.04.2011 unused, all have the same size (todo)
unsigned char name[32];
unsigned char fastData[32];
} activityObject;
extern struct activityObjects *actObjects;
int activityObjectsLock( struct activityObjects *objects );
int activityObjectsUnlock( struct activityObjects *objects );
struct activityObjects *activityObjectsInit( ); // from controller
struct activityObjects *activityObjectsClone( ); // from applications
int activityObjectInit( struct activityObject *object );
int activityObjectRegister( struct activityObjects *objects, unsigned char *name );
int activityObjectClone( struct activityObjects *objects, unsigned char *name, struct activityObject *clone );
int activityObjectSet( struct activityObjects *objects, unsigned char *name, struct activityObject *from );
int activityObjectGet( struct activityObjects *objects, unsigned char *name );
#endif