From 9b8a3e11c558877c09416991ff1ec840fea6d0ab Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sat, 2 Dec 2017 14:01:03 +0100 Subject: lib, tools: Rename application process and instance This refactors ouroboros to use "program" instead of "application process" and "process" instead of "application process instance" to align with current naming in current Operating Systems courses instead of the ISO nomenclature adopted by RINA. This change permeates through the entire implementation. Also contains some minor other refactors. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/shm_rdrbuff.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/shm_rdrbuff.c') diff --git a/src/lib/shm_rdrbuff.c b/src/lib/shm_rdrbuff.c index 4c00c74d..4145115a 100644 --- a/src/lib/shm_rdrbuff.c +++ b/src/lib/shm_rdrbuff.c @@ -103,7 +103,7 @@ struct shm_rdrbuff { pthread_mutex_t * lock; /* lock all free space in shm */ pthread_cond_t * full; /* flag when full */ pthread_cond_t * healthy; /* flag when SDU is read */ - pid_t * api; /* api of the irmd owner */ + pid_t * pid; /* pid of the irmd owner */ }; static void garbage_collect(struct shm_rdrbuff * rdrb) @@ -148,7 +148,7 @@ void shm_rdrbuff_destroy(struct shm_rdrbuff * rdrb) assert(rdrb); - if (getpid() != *rdrb->api && kill(*rdrb->api, 0) == 0) + if (getpid() != *rdrb->pid && kill(*rdrb->pid, 0) == 0) return; shm_rdrbuff_close(rdrb); @@ -197,7 +197,7 @@ static struct shm_rdrbuff * rdrb_create(int flags) rdrb->lock = (pthread_mutex_t *) (rdrb->tail + 1); rdrb->full = (pthread_cond_t *) (rdrb->lock + 1); rdrb->healthy = rdrb->full + 1; - rdrb->api = (pid_t *) (rdrb->healthy + 1); + rdrb->pid = (pid_t *) (rdrb->healthy + 1); free(shm_rdrb_fn); @@ -257,7 +257,7 @@ struct shm_rdrbuff * shm_rdrbuff_create() *rdrb->head = 0; *rdrb->tail = 0; - *rdrb->api = getpid(); + *rdrb->pid = getpid(); pthread_mutexattr_destroy(&mattr); pthread_condattr_destroy(&cattr); -- cgit v1.2.3