diff options
| author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2017-01-09 16:40:40 +0100 | 
|---|---|---|
| committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2017-01-09 16:40:40 +0100 | 
| commit | 6c1cfb990f56b2fa87500732cb4f0966616907c7 (patch) | |
| tree | 4af3a0e2ce9fc12d7dc759803da70b7f570d6f8a /src/irmd | |
| parent | e56d24010287127fc6b9c9da8d1f7cf160c50253 (diff) | |
| parent | 5273b0f5915956e49bcad4167cca2c1349e8816d (diff) | |
| download | ouroboros-6c1cfb990f56b2fa87500732cb4f0966616907c7.tar.gz ouroboros-6c1cfb990f56b2fa87500732cb4f0966616907c7.zip | |
Merged in dstaesse/ouroboros/be-list (pull request #340)
Updates to list and fixes LGPL license for library
Diffstat (limited to 'src/irmd')
| -rw-r--r-- | src/irmd/api_table.c | 6 | ||||
| -rw-r--r-- | src/irmd/api_table.h | 2 | ||||
| -rw-r--r-- | src/irmd/apn_table.c | 6 | ||||
| -rw-r--r-- | src/irmd/apn_table.h | 2 | ||||
| -rw-r--r-- | src/irmd/ipcp.c | 2 | ||||
| -rw-r--r-- | src/irmd/ipcp.h | 2 | ||||
| -rw-r--r-- | src/irmd/irm_flow.c | 2 | ||||
| -rw-r--r-- | src/irmd/irm_flow.h | 2 | ||||
| -rw-r--r-- | src/irmd/main.c | 20 | ||||
| -rw-r--r-- | src/irmd/registry.c | 20 | ||||
| -rw-r--r-- | src/irmd/registry.h | 2 | ||||
| -rw-r--r-- | src/irmd/utils.c | 2 | ||||
| -rw-r--r-- | src/irmd/utils.h | 2 | 
13 files changed, 35 insertions, 35 deletions
| diff --git a/src/irmd/api_table.c b/src/irmd/api_table.c index 97b8eb0f..7619fcf6 100644 --- a/src/irmd/api_table.c +++ b/src/irmd/api_table.c @@ -1,5 +1,5 @@  /* - * Ouroboros - Copyright (C) 2016 + * Ouroboros - Copyright (C) 2016 - 2017   *   * The IPC Resource Manager - Application Instance Table   * @@ -42,8 +42,8 @@ struct api_entry * api_entry_create(pid_t api, char * apn)          if (e == NULL)                  return NULL; -        INIT_LIST_HEAD(&e->next); -        INIT_LIST_HEAD(&e->names); +        list_head_init(&e->next); +        list_head_init(&e->names);          e->api      = api;          e->apn      = apn; diff --git a/src/irmd/api_table.h b/src/irmd/api_table.h index d2943532..df788bbc 100644 --- a/src/irmd/api_table.h +++ b/src/irmd/api_table.h @@ -1,5 +1,5 @@  /* - * Ouroboros - Copyright (C) 2016 + * Ouroboros - Copyright (C) 2016 - 2017   *   * The IPC Resource Manager - Application Instance Table   * diff --git a/src/irmd/apn_table.c b/src/irmd/apn_table.c index 34983f78..955618d8 100644 --- a/src/irmd/apn_table.c +++ b/src/irmd/apn_table.c @@ -1,5 +1,5 @@  /* - * Ouroboros - Copyright (C) 2016 + * Ouroboros - Copyright (C) 2016 - 2017   *   * The IPC Resource Manager - Application Process Table   * @@ -41,8 +41,8 @@ struct apn_entry * apn_entry_create(char * apn,          if (e == NULL)                  return NULL; -        INIT_LIST_HEAD(&e->next); -        INIT_LIST_HEAD(&e->names); +        list_head_init(&e->next); +        list_head_init(&e->names);          e->apn   = apn;          e->ap    = ap; diff --git a/src/irmd/apn_table.h b/src/irmd/apn_table.h index dfc514d7..550012bf 100644 --- a/src/irmd/apn_table.h +++ b/src/irmd/apn_table.h @@ -1,5 +1,5 @@  /* - * Ouroboros - Copyright (C) 2016 + * Ouroboros - Copyright (C) 2016 - 2017   *   * The IPC Resource Manager - Application Process Names Table   * diff --git a/src/irmd/ipcp.c b/src/irmd/ipcp.c index 07ae0dc2..cad4dd88 100644 --- a/src/irmd/ipcp.c +++ b/src/irmd/ipcp.c @@ -1,5 +1,5 @@  /* - * Ouroboros - Copyright (C) 2016 + * Ouroboros - Copyright (C) 2016 - 2017   *   * The API to instruct IPCPs   * diff --git a/src/irmd/ipcp.h b/src/irmd/ipcp.h index a3c2e89a..429e0d5d 100644 --- a/src/irmd/ipcp.h +++ b/src/irmd/ipcp.h @@ -1,5 +1,5 @@  /* - * Ouroboros - Copyright (C) 2016 + * Ouroboros - Copyright (C) 2016 - 2017   *   * The API for the IRM to instruct IPCPs   * diff --git a/src/irmd/irm_flow.c b/src/irmd/irm_flow.c index c2b4db62..86252a03 100644 --- a/src/irmd/irm_flow.c +++ b/src/irmd/irm_flow.c @@ -1,5 +1,5 @@  /* - * Ouroboros - Copyright (C) 2016 + * Ouroboros - Copyright (C) 2016 - 2017   *   * The IPC Resource Manager - Flows   * diff --git a/src/irmd/irm_flow.h b/src/irmd/irm_flow.h index d3033418..dc60d139 100644 --- a/src/irmd/irm_flow.h +++ b/src/irmd/irm_flow.h @@ -1,5 +1,5 @@  /* - * Ouroboros - Copyright (C) 2016 + * Ouroboros - Copyright (C) 2016 - 2017   *   * The IPC Resource Manager - Flows   * diff --git a/src/irmd/main.c b/src/irmd/main.c index b7292e74..9dc08cbe 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -1,5 +1,5 @@  /* - * Ouroboros - Copyright (C) 2016 + * Ouroboros - Copyright (C) 2016 - 2017   *   * The IPC Resource Manager   * @@ -150,7 +150,7 @@ static struct ipcp_entry * ipcp_entry_create(void)          e->name = NULL;          e->dif_name = NULL; -        INIT_LIST_HEAD(&e->next); +        list_head_init(&e->next);          return e;  } @@ -260,7 +260,7 @@ static pid_t create_ipcp(char * name, enum ipcp_type ipcp_type)                  return -1;          } -        INIT_LIST_HEAD(&tmp->next); +        list_head_init(&tmp->next);          tmp->api = api->pid;          tmp->name = strdup(name); @@ -743,7 +743,7 @@ static int name_reg(char * name, char ** difs, size_t len)          pthread_rwlock_wrlock(&irmd->reg_lock); -        if (list_empty(&irmd->ipcps)) { +        if (list_is_empty(&irmd->ipcps)) {                  pthread_rwlock_unlock(&irmd->reg_lock);                  pthread_rwlock_unlock(&irmd->state_lock);                  return -1; @@ -1988,12 +1988,12 @@ static int irm_create(void)                  return -1;          } -        INIT_LIST_HEAD(&irmd->ipcps); -        INIT_LIST_HEAD(&irmd->api_table); -        INIT_LIST_HEAD(&irmd->apn_table); -        INIT_LIST_HEAD(&irmd->spawned_apis); -        INIT_LIST_HEAD(&irmd->registry); -        INIT_LIST_HEAD(&irmd->irm_flows); +        list_head_init(&irmd->ipcps); +        list_head_init(&irmd->api_table); +        list_head_init(&irmd->apn_table); +        list_head_init(&irmd->spawned_apis); +        list_head_init(&irmd->registry); +        list_head_init(&irmd->irm_flows);          irmd->port_ids = bmp_create(IRMD_MAX_FLOWS, 0);          if (irmd->port_ids == NULL) { diff --git a/src/irmd/registry.c b/src/irmd/registry.c index 34d0a921..35c17069 100644 --- a/src/irmd/registry.c +++ b/src/irmd/registry.c @@ -1,5 +1,5 @@  /* - * Ouroboros - Copyright (C) 2016 + * Ouroboros - Copyright (C) 2016 - 2017   *   * The IPC Resource Manager - Registry   * @@ -63,10 +63,10 @@ static struct reg_entry * reg_entry_init(struct reg_entry * e,          if (e == NULL || name == NULL)                  return NULL; -        INIT_LIST_HEAD(&e->next); -        INIT_LIST_HEAD(&e->difs); -        INIT_LIST_HEAD(&e->reg_apns); -        INIT_LIST_HEAD(&e->reg_apis); +        list_head_init(&e->next); +        list_head_init(&e->difs); +        list_head_init(&e->reg_apns); +        list_head_init(&e->reg_apis);          e->name = name; @@ -228,7 +228,7 @@ void reg_entry_del_apn(struct reg_entry * e, char * apn)                  }          } -        if (e->state == REG_NAME_AUTO_ACCEPT && list_empty(&e->reg_apns)) { +        if (e->state == REG_NAME_AUTO_ACCEPT && list_is_empty(&e->reg_apns)) {                  e->state = REG_NAME_IDLE;                  pthread_cond_broadcast(&e->state_cond);          } @@ -237,7 +237,7 @@ void reg_entry_del_apn(struct reg_entry * e, char * apn)  char * reg_entry_get_apn(struct reg_entry * e)  { -        if (!list_empty(&e->reg_apis) || list_empty(&e->reg_apns)) +        if (!list_is_empty(&e->reg_apis) || list_is_empty(&e->reg_apns))                  return NULL;          return list_first_entry(&e->reg_apns, struct str_el, next)->str; @@ -311,8 +311,8 @@ void reg_entry_del_api(struct reg_entry * e, pid_t api)                  }          } -        if (list_empty(&e->reg_apis)) { -                if (!list_empty(&e->reg_apns)) +        if (list_is_empty(&e->reg_apis)) { +                if (!list_is_empty(&e->reg_apns))                          e->state = REG_NAME_AUTO_ACCEPT;                  else                          e->state = REG_NAME_IDLE; @@ -328,7 +328,7 @@ pid_t reg_entry_get_api(struct reg_entry * e)          if (e == NULL)                  return -1; -        if (list_empty(&e->reg_apis)) +        if (list_is_empty(&e->reg_apis))                  return -1;          return list_first_entry(&e->reg_apis, struct pid_el, next)->pid; diff --git a/src/irmd/registry.h b/src/irmd/registry.h index 20c06a51..bdd5cad0 100644 --- a/src/irmd/registry.h +++ b/src/irmd/registry.h @@ -1,5 +1,5 @@  /* - * Ouroboros - Copyright (C) 2016 + * Ouroboros - Copyright (C) 2016 - 2017   *   * The IPC Resource Manager - Registry   * diff --git a/src/irmd/utils.c b/src/irmd/utils.c index 97b0cfa0..7d63f020 100644 --- a/src/irmd/utils.c +++ b/src/irmd/utils.c @@ -1,5 +1,5 @@  /* - * Ouroboros - Copyright (C) 2016 + * Ouroboros - Copyright (C) 2016 - 2017   *   * The IPC Resource Manager - Utilities   * diff --git a/src/irmd/utils.h b/src/irmd/utils.h index 1214b721..03296259 100644 --- a/src/irmd/utils.h +++ b/src/irmd/utils.h @@ -1,5 +1,5 @@  /* - * Ouroboros - Copyright (C) 2016 + * Ouroboros - Copyright (C) 2016 - 2017   *   * Utils of the IPC Resource Manager   * | 
