[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Are these bugs of pthread ?
From: |
奈良原 伸哉 |
Subject: |
Are these bugs of pthread ? |
Date: |
Wed, 24 Jan 2001 12:57:43 +0900 |
Dear developers...
The header file "pthread.h" which is contained in
ftp://alpha.gnu.org/gnu/glibc/glibc-linuxthreads-2.1.2.tar.bz2,
has some syntax errors. For example, pthread_cleanup_push()
in pthread.h has lines below:
#define pthread_cealnup_push(routine,arg) \
{ struct _pthread_cleanup_buffer _buffer; \
_pthread_cleanup_push (&_buffer, (routine), (arg));
The blace mismatch error exists at last line. You can
find out these errors by compiling program below:
---------------------- from here ------------------------
#include <stdio.h>
#include <pthread.h>
void cleanup( void* datp )
{
puts( "cleanup()" );
}
void* thread( void* datp )
{
while( 1 ) {
usleep( 1000*100 );
pthread_testcancel();
}
return( NULL );
}
int main( void )
{
pthread_t tid;
void *ret;
pthread_create( &tid, NULL, thread, NULL );
pthread_cleanup_push( cleanup, (void*)&tid );
pthread_join( tid, &ret );
return( 0 );
}
----------------------- to here -------------------------
The definitions below have same error in it, so please
fix them.
pthread_cleanup_push()
phhread_cleanup_pop()
pthread_cleanup_push_defer_np()
pthread_cleanup_pop_restore_np()
Best regard...
--
*****************************************************************
Shinya Narahara @ Linux Business Center
Hitachi, Ltd., Platform Solution Development Division
E-mail : address@hidden
- Are these bugs of pthread ?,
奈良原 伸哉 <=