diff options
author | Dimitri Staessens <dimitri.staessens@ugent.be> | 2017-12-02 14:01:03 +0100 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2017-12-02 14:56:20 +0100 |
commit | 9b8a3e11c558877c09416991ff1ec840fea6d0ab (patch) | |
tree | f2faf7a4ab45687782a010fb6e48829e8ee1bdeb /src/lib/shm_rdrbuff.c | |
parent | f43e5e2329fb798047d15dd0748e5eef3359c966 (diff) | |
download | ouroboros-9b8a3e11c558877c09416991ff1ec840fea6d0ab.tar.gz ouroboros-9b8a3e11c558877c09416991ff1ec840fea6d0ab.zip |
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 <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src/lib/shm_rdrbuff.c')
-rw-r--r-- | src/lib/shm_rdrbuff.c | 8 |
1 files changed, 4 insertions, 4 deletions
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); |