summaryrefslogtreecommitdiff
path: root/test/pthread/ex5.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-01-29 02:56:45 +0000
committerMike Frysinger <vapier@gentoo.org>2007-01-29 02:56:45 +0000
commit92a56f367e6635bebf4e519a49943c15d2981d85 (patch)
tree8d0cc34ab7791579c5e7979bc09b5ede8b1bc7be /test/pthread/ex5.c
parent55aaeb574609ff7fb7ac93ce4ffe01be0a56f5b7 (diff)
fixup prototype warnings
Diffstat (limited to 'test/pthread/ex5.c')
-rw-r--r--test/pthread/ex5.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/pthread/ex5.c b/test/pthread/ex5.c
index 475de0e0c..7a293eb01 100644
--- a/test/pthread/ex5.c
+++ b/test/pthread/ex5.c
@@ -19,7 +19,7 @@ struct prodcons {
/* Initialize a buffer */
-void init(struct prodcons * b)
+static void init(struct prodcons * b)
{
sem_init(&b->sem_write, 0, BUFFER_SIZE - 1);
sem_init(&b->sem_read, 0, 0);
@@ -29,7 +29,7 @@ void init(struct prodcons * b)
/* Store an integer in the buffer */
-void put(struct prodcons * b, int data)
+static void put(struct prodcons * b, int data)
{
/* Wait until buffer is not full */
sem_wait(&b->sem_write);
@@ -43,7 +43,7 @@ void put(struct prodcons * b, int data)
/* Read and remove an integer from the buffer */
-int get(struct prodcons * b)
+static int get(struct prodcons * b)
{
int data;
/* Wait until buffer is not empty */
@@ -64,7 +64,7 @@ int get(struct prodcons * b)
struct prodcons buffer;
-void * producer(void * data)
+static void * producer(void * data)
{
int n;
for (n = 0; n < 10000; n++) {
@@ -75,7 +75,7 @@ void * producer(void * data)
return NULL;
}
-void * consumer(void * data)
+static void * consumer(void * data)
{
int d;
while (1) {