summaryrefslogtreecommitdiff
path: root/test/pthread
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
parent55aaeb574609ff7fb7ac93ce4ffe01be0a56f5b7 (diff)
fixup prototype warnings
Diffstat (limited to 'test/pthread')
-rw-r--r--test/pthread/ex1.c2
-rw-r--r--test/pthread/ex2.c10
-rw-r--r--test/pthread/ex4.c6
-rw-r--r--test/pthread/ex5.c10
-rw-r--r--test/pthread/ex6.c2
-rw-r--r--test/pthread/ex7.c2
6 files changed, 16 insertions, 16 deletions
diff --git a/test/pthread/ex1.c b/test/pthread/ex1.c
index a1b24c31a..4d9de03d8 100644
--- a/test/pthread/ex1.c
+++ b/test/pthread/ex1.c
@@ -7,7 +7,7 @@
#include <unistd.h>
#include "pthread.h"
-void *process(void * arg)
+static void *process(void * arg)
{
int i;
printf("Starting process %s\n", (char *)arg);
diff --git a/test/pthread/ex2.c b/test/pthread/ex2.c
index 70cb6b398..98bd4b347 100644
--- a/test/pthread/ex2.c
+++ b/test/pthread/ex2.c
@@ -20,7 +20,7 @@ struct prodcons {
/* Initialize a buffer */
-void init(struct prodcons * b)
+static void init(struct prodcons * b)
{
pthread_mutex_init(&b->lock, NULL);
pthread_cond_init(&b->notempty, NULL);
@@ -31,7 +31,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)
{
pthread_mutex_lock(&b->lock);
/* Wait until buffer is not full */
@@ -50,7 +50,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;
pthread_mutex_lock(&b->lock);
@@ -75,7 +75,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++) {
@@ -86,7 +86,7 @@ void * producer(void * data)
return NULL;
}
-void * consumer(void * data)
+static void * consumer(void * data)
{
int d;
while (1) {
diff --git a/test/pthread/ex4.c b/test/pthread/ex4.c
index 11a09f013..cf4cf1d69 100644
--- a/test/pthread/ex4.c
+++ b/test/pthread/ex4.c
@@ -14,7 +14,7 @@
#if 0
-char * str_accumulate(char * s)
+static char * str_accumulate(char * s)
{
static char accu[1024] = { 0 };
strcat(accu, s);
@@ -40,7 +40,7 @@ static void str_alloc_destroy_accu(void * accu);
/* Thread-safe version of str_accumulate */
-char * str_accumulate(const char * s)
+static char * str_accumulate(const char * s)
{
char * accu;
@@ -81,7 +81,7 @@ static void str_alloc_destroy_accu(void * accu)
/* Test program */
-void * process(void * arg)
+static void * process(void * arg)
{
char * res;
res = str_accumulate("Result of ");
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) {
diff --git a/test/pthread/ex6.c b/test/pthread/ex6.c
index 15914ce85..bb96ca5fa 100644
--- a/test/pthread/ex6.c
+++ b/test/pthread/ex6.c
@@ -4,7 +4,7 @@
#include <pthread.h>
#include <unistd.h>
-void *
+static void *
test_thread (void *v_param)
{
return NULL;
diff --git a/test/pthread/ex7.c b/test/pthread/ex7.c
index bda2ca9eb..93fc34a8c 100644
--- a/test/pthread/ex7.c
+++ b/test/pthread/ex7.c
@@ -22,7 +22,7 @@ typedef struct {
event_t main_event;
-void *
+static void *
test_thread (void *ms_param)
{
unsigned long status = 0;