Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> pthread_cleanup_push and pop in pro*c
hi!
I am using the following pro*c program, it gives the error shown below after the program.
Thanks,
Pradeep
/*********************************************************************//* file wrapper.pc */
#include <stdio.h>
#include <pthread.h>
void clean_rt(void *);
void pthread_cleanup_push_wrapper() ;
main() {
pthread_cleanup_push_wrapper();
}
void clean_rt(void *sw) {
printf("Doing clean up job.....\n"); sleep(2);
void pthread_cleanup_push_wrapper(){
pthread_cleanup_push(clean_rt,NULL) ; pthread_cleanup_pop(0) ;
}
/*******************************************************************/
I am getting the following Error :
Pro*C/C++: Release 2.2.3.0.0 - Production on Fri Oct 9 11:14:03 1998
Copyright (c) Oracle Corporation 1979, 1996. All rights reserved.
System default option values taken from: /u01/app/oracle/product/7.3.3/precomp/admin/pcscfg.h
Syntax error at line 17, column 2, file wrapper.pc: pthread_cleanup_push(clean_rt,NULL) ; ........1 (1) PCC-S-02201, Encountered the symbol "{" when expecting one of the following:
; , = : ( [ * ? | & < > + - / % . ^ *= /= %= += -= <<= >>=
&&= ||= ^= | & == != <= >= << >> ++ -- ->
The symbol ";" was substituted for "{" to continue.
Syntax error at line 18, column 2, file wrapper.pc: pthread_cleanup_pop(0) ; ........1 (1) PCC-S-02201, Encountered the symbol "{" when expecting one of the following:
; , = : ( [ * ? | & < > + - / % . ^ *= /= %= += -= <<= >>=
&&= ||= ^= | & == != <= >= << >> ++ -- ->
The symbol ";" was substituted for "{" to continue.
(1) PCC-F-02102, Fatal error while doing C preprocessing
dec1000>
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Oct 09 1998 - 00:46:47 CDT