07-24-2001
Threads in Unix
Hi,
I know very little about C and Unix. I have written a program to use threads. The program needs to get some values from a very large database.
I wrote a simple program and compiled but got the following errors.....
cc mythread.c -lthread
"/usr/include/pthread.h", line 120: syntax error before or at: *
"/usr/include/pthread.h", line 121: function cannot return function or array
"/usr/include/pthread.h", line 121: syntax error before or at: void
"/usr/include/pthread.h", line 121: warning: syntax error: empty declaration
"/usr/include/pthread.h", line 123: syntax error before or at: void
"/usr/include/pthread.h", line 124: warning: function prototype parameters must
have types
"/usr/include/pthread.h", line 125: syntax error before or at: *
"/usr/include/pthread.h", line 126: syntax error before or at: *
"/usr/include/pthread.h", line 127: syntax error before or at: *
"/usr/include/pthread.h", line 128: syntax error before or at: *
"/usr/include/pthread.h", line 129: syntax error before or at: *
"/usr/include/pthread.h", line 131: syntax error before or at: *
"/usr/include/pthread.h", line 133: syntax error before or at: *
"/usr/include/pthread.h", line 134: syntax error before or at: *
"/usr/include/pthread.h", line 135: syntax error before or at: *
"/usr/include/pthread.h", line 136: syntax error before or at: *
"/usr/include/pthread.h", line 137: syntax error before or at: *
"/usr/include/pthread.h", line 137: function cannot return function or array
"/usr/include/pthread.h", line 137: syntax error before or at: )
"/usr/include/pthread.h", line 137: warning: syntax error: empty declaration
"/usr/include/pthread.h", line 138: cannot recover from previous errors
I am using DYNIX/ptx, v 4.5
YOur help will be highly appreciated
thanks
reddyb
Last edited by reddyb; 07-25-2001 at 10:44 AM..
7 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi, someone knows about a Load Generator for web?, I´ve been searching the web and I found "Astra Test", but I doesn´t work.
Thanks! :) (3 Replies)
Discussion started by: momo
3 Replies
2. UNIX for Dummies Questions & Answers
All,
Have an AMD-K6/2 PC, 20G.Hd along with RH7.2.
Wanting to know what I should do in terms of setup (workstation/server) and then what I can do with it?
I'd like to learn a DBMS and SQL - can I do this using RedHat?
Any suggestions with how I can use/ what I can do with this appreciated. (3 Replies)
Discussion started by: Cameron
3 Replies
3. UNIX for Advanced & Expert Users
Hello there!
Slightly off topic maybe, but maybe someone can help us. For a videoshow which will be called reality 6.1 we need a video file from a unix kernel that is compiling. Does anyone know how to capture this, or does anyone have such a vid?
cheers,
iuno
(www.iuno.nl) (2 Replies)
Discussion started by: iuno
2 Replies
4. Shell Programming and Scripting
hi ,
i am writing a script to copy the MQ messages from onw queue to another. The following i got from one site, but i di not understand , can anyone explain.
/root/scripts/sap/q -m$Q_MANAGER -i$Q_NAME_SRC_1 -F/logs/mq/MQ_COPYdump_$Q_NAME_SRC_1.$$
/root/scripts/sap/q -m$Q_MANAGER... (0 Replies)
Discussion started by: Satyak
0 Replies
5. SCO
Hi guys!!! i have a sco unix 3.2 v4.2 floppy's but i don't have N1 boot disk!!
how to find it??? :confused:
thanks!! (sorry for my bad english!) (4 Replies)
Discussion started by: panos_pit
4 Replies
6. Programming
Hi to all,
i am trying to make a kernel call that will display the number of times each kernel call was called. Any idea where to look? I can't find the right files and also how to get all those values. Already made a kernel call that displays how many kernel calls are in the system. I am using... (6 Replies)
Discussion started by: hariscy
6 Replies
7. What is on Your Mind?
Greetings all!!
Have only recently signed up to this forum and I must say I am thoroughly impressed! :D
Everyone has been nothing but amazingly helpful and I haven't been made to feel like the newbie that I am.
I will definately be becoming a daily user of this site not only for help... (1 Reply)
Discussion started by: U_C_Dispatj
1 Replies
LEARN ABOUT CENTOS
pthread
pthread.h(3HEAD) Headers pthread.h(3HEAD)
NAME
pthread.h, pthread - threads
SYNOPSIS
#include <pthread.h>
DESCRIPTION
The <pthread.h> header defines the following symbols:
PTHREAD_BARRIER_SERIAL_THREAD
PTHREAD_CANCEL_ASYNCHRONOUS
PTHREAD_CANCEL_ENABLE
PTHREAD_CANCEL_DEFERRED
PTHREAD_CANCEL_DISABLE
PTHREAD_CANCELED
PTHREAD_COND_INITIALIZER
PTHREAD_CREATE_DETACHED
PTHREAD_CREATE_JOINABLE
PTHREAD_EXPLICIT_SCHED
PTHREAD_INHERIT_SCHED
PTHREAD_MUTEX_DEFAULT
PTHREAD_MUTEX_ERRORCHECK
PTHREAD_MUTEX_INITIALIZER
PTHREAD_MUTEX_NORMAL
PTHREAD_MUTEX_RECURSIVE
PTHREAD_ONCE_INIT
PTHREAD_PRIO_INHERIT
PTHREAD_PRIO_NONE
PTHREAD_PRIO_PROTECT
PTHREAD_PROCESS_SHARED
PTHREAD_PROCESS_PRIVATE
PTHREAD_SCOPE_PROCESS
PTHREAD_SCOPE_SYSTEM
The types listed below are defined as described in <sys/types.h>. See types.h(3HEAD).
pthread_attr_t
pthread_barrier_t
pthread_barrierattr_t
pthread_cond_t
pthread_condattr_t
pthread_key_t
pthread_mutex_t
pthread_mutexattr_t
pthread_once_t
pthread_rwlock_t
pthread_rwlockattr_t
pthread_spinlock_t
pthread_t
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
sched.h(3HEAD), time.h(3HEAD), types.h(3HEAD), pthread_attr_getguardsize(3C), pthread_attr_init(3C), pthread_attr_setscope(3C),
pthread_cancel(3C), pthread_cleanup_pop(3C), pthread_cond_init(3C), pthread_cond_signal(3C), pthread_cond_wait(3C), pthread_con-
dattr_init(3C), pthread_create(3C), pthread_detach(3C), pthread_equal(3C), pthread_exit(3C), pthread_getconcurrency(3C), pthread_getsched-
param(3C), pthread_join(3C), pthread_key_create(3C), pthread_key_delete(3C), pthread_mutex_init(3C), pthread_mutex_lock(3C),
pthread_mutex_setprioceiling(3C), pthread_mutexattr_init(3C), pthread_mutexattr_init(3C), pthread_mutexattr_init(3C), pthread_mutex-
attr_gettype(3C), pthread_mutexattr_getprotocol(3C), pthread_once(3C), pthread_rwlock_init(3C), pthread_rwlock_rdlock(3C),
pthread_rwlock_unlock(3C), pthread_rwlock_wrlock(3C), pthread_rwlockattr_getpshared(3C), pthread_rwlockattr_init(3C), pthread_self(3C),
pthread_setcancelstate(3C), pthread_setspecific(3C), attributes(5), standards(5)
SunOS 5.10 9 Sep 2004 pthread.h(3HEAD)