EmbLogic's Blog

Getting,initializing,retrieving and releasing the semaphore..

RCS file: semaphore_example.c,v
Working file: semaphore_example.c
head: 1.5
branch:
locks: strict
root: 1.5
access list:
symbolic names:
keyword substitution: kv
total revisions: 5;    selected revisions: 5
description:
This is the main program to understand the working of semaphore.
Initially only the header.h header file is included in the program.
—————————-
revision 1.5    locked by: root;
date: 2014/01/15 06:28:52;  author: root;  state: Exp;  lines: +11 -1
Successfully implemented the signal() operation on the semaphore.
After performing the operation.A statement is added to check the value of the semaphore.
—————————-
revision 1.4
date: 2014/01/15 06:18:22;  author: root;  state: Exp;  lines: +1 -0
Program working fine.
A new statement is added which will give the value of the semaphore.
semctl() function is used to get the value.
—————————-
revision 1.3
date: 2014/01/15 06:08:35;  author: root;  state: Exp;  lines: +15 -0
semctl() function is used to set the value of the semaphore.
A check is also added to see if the call to semctl() is successfull or not.
—————————-
revision 1.2
date: 2014/01/15 05:52:39;  author: root;  state: Exp;  lines: +11 -0
semget() is used to create a new semaphore.The semaphore key 1235 is given to it.
After the call to semget() succeeds it returns the seamphore-id.
A check is added to display an error if the semaphore cannot be created.
—————————-
revision 1.1
date: 2014/01/15 05:46:04;  author: root;  state: Exp;
Initial revision
=============================================================================

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>