03-25-2002
Sorry for the Delayed Update.
In case of Multi Threaded Programming., just before including the
pthread.h file just define _REENTRANT., then the system will take care of making the errno thread safe.
Ex:-
#define _REENTRANT
#include <pthread.h>
main()
{
}
Regards
10 More Discussions You Might Find Interesting
1. Programming
Hello,
I need to make a lib with pthread, when I run my make file all is good. But when I run my test program, I test errno in the begining and is already set to 251. Is it normal ??? What can I modify in my Makefile to have errno set to 0 ???
Thanks
$make
gcc -D_REENTRANT -shared -fpic... (3 Replies)
Discussion started by: dts
3 Replies
2. Programming
How should I use errno in a c program and what info does it have .
I am working with directories and files.
So can any one tell me How to access errno?I am using the stat() function on \etc directory and I am alble to access only the half of the directories.I am not able to access other half and... (6 Replies)
Discussion started by: vijlak
6 Replies
3. Linux
hello,
here I am copying my code...
I am using two threads for reading and writing at com ports....one for reading and one for writing...in read thread I am using select() api....and polling again and again if there is some data to be read....but select is not returning any positive value so... (0 Replies)
Discussion started by: arunchaudhary19
0 Replies
4. Programming
hello,
here I am copying my code...
I am using two threads for reading and writing at com ports....one for reading and one for writing...in read thread I am using select() api....and polling again and again if there is some data to be read....but select is not returning any positive value so... (0 Replies)
Discussion started by: arunchaudhary19
0 Replies
5. Programming
Hey, Can I assume that for certain function calls, errno can never be set to a certain value.
More specifically, can I assume that for if the stat function call fails, the errno can never be or "No space left on device."
I am assuming that a read function cannot fail because of no space... (5 Replies)
Discussion started by: the_learner
5 Replies
6. Shell Programming and Scripting
Hello all
is there any way in unix to execute command in multithreaded way
without doing it in java or cpp
can one of the scripts handle multithread execution ?
i need to test server requests ( corba ) in multithread
Thanks (0 Replies)
Discussion started by: umen
0 Replies
7. UNIX for Advanced & Expert Users
hi all,
i am using pthreads.
What will happen if a thread does a fork?
will all the threads are duplicated for the new process or only the called thread is duplicated?
are the resources shared across the processes?
thank you (0 Replies)
Discussion started by: skyrulz
0 Replies
8. Programming
I'd like to write a program (I'm flexible on language; C/C++ was my original idea but a scripting language would probably be better) that runs hundreds of programs, but only N = 4 (say) at a time. The idea is to keep all the cores on a multicore machine busy.
How can I do this? In particular,... (6 Replies)
Discussion started by: CRGreathouse
6 Replies
9. Programming
here the program gives a odd result:
#include <stdio.h>
int main(){
perror("first");
perror("next");
return 0;
}
result:
first: Success
next: Illegal seek
why? any resonable explanation? i found no information about this in man pages.
thanks in advance (2 Replies)
Discussion started by: ebd
2 Replies
10. AIX
Hi, I need to look at a recent copy of /usr/include/errno.h from AIX 7.2 to check some symbols. In particular, I'm curious if it defines EOWNERDEAD and ENOTRECOVERABLE. Can someone who has access to 7.2 please check for me? Thanks! (1 Reply)
Discussion started by: topcat
1 Replies
LEARN ABOUT PHP
collectable
COLLECTABLE(3) 1 COLLECTABLE(3)
The Collectable class
INTRODUCTION
Represents a garbage-collectable object.
Collectable objects are intended to be used by the Pool class, replacing Threaded objects as the unit of work. They provide methods to set
and detect the collectability of an object.
CLASS SYNOPSIS
Collectable
Collectableextends
Threaded
Methods
o public bool Collectable::isGarbage (void )
o public void Collectable::setGarbage (void )
Inherited methods
o public array Threaded::chunk (integer $size, boolean $preserve)
o public integer Threaded::count (void )
o public bool Threaded::extend (string $class)
o public Threaded Threaded::from (Closure $run, [Closure $construct], [array $args])
o public array Threaded::getTerminationInfo (void )
o public boolean Threaded::isRunning (void )
o public boolean Threaded::isTerminated (void )
o public boolean Threaded::isWaiting (void )
o public boolean Threaded::lock (void )
o public boolean Threaded::merge (mixed $from, [bool $overwrite])
o public boolean Threaded::notify (void )
o public boolean Threaded::pop (void )
o public void Threaded::run (void )
o public mixed Threaded::shift (void )
o public mixed Threaded::synchronized (Closure $block, [mixed $...])
o public boolean Threaded::unlock (void )
o public boolean Threaded::wait ([integer $timeout])
PHP Documentation Group COLLECTABLE(3)