1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

get rid of LIST_INIT

This commit is contained in:
Steffen Vogel 2018-10-19 13:41:50 +02:00
parent e0a02c74f5
commit d335837525
2 changed files with 3 additions and 9 deletions

View file

@ -41,14 +41,6 @@ extern "C" {
#define LIST_CHUNKSIZE 16
/** Static list initialization */
#define LIST_INIT() { \
.array = NULL, \
.length = 0, \
.capacity = 0, \
.lock = PTHREAD_MUTEX_INITIALIZER, \
.state = STATE_INITIALIZED \
}
#define LIST_INIT_STATIC(l) \
__attribute__((constructor(105))) static void UNIQUE(__ctor)() {\
if ((l)->state == STATE_DESTROYED) \

View file

@ -60,11 +60,13 @@ const struct iec61850_type_descriptor type_descriptors[] = {
};
/** Each network interface needs a separate receiver */
static struct list receivers = LIST_INIT();
static struct list receivers;
static pthread_t thread;
static EthernetHandleSet hset;
static int users = 0;
LIST_INIT_STATIC(&receivers);
static void * iec61850_thread(void *ctx)
{
int ret;