04-03-2009
OK. One more wuestion. What is the affect if I use just "return", intead of pthread_exit() in my thread function body.
7 More Discussions You Might Find Interesting
1. Solaris
Hi,
I am running Solaris 8 on Sun server with 2 hard drives. I have configured mirroring on the system using DiskSuite tool in order to have the same data on both disks. Now I want to perform some software upgrade and I would like to use the second disk as a backup disk. This means taking this... (3 Replies)
Discussion started by: carlossg
3 Replies
2. Programming
Hi,
I am stuck up with a strange problem.
I am writing an application - a kinda tracker that reads data from memcache and invokes theads to process each record of the memcache.
I dont want to join all my threads because my tracker should poll the cache in regular intervals say sum 300... (2 Replies)
Discussion started by: deepti_v25
2 Replies
3. Programming
Hello,
I have created program that run threads one by one, maximum 100. Each thread will process one block of data, and once it`s finished, new thread is created with new block of data....etc
I have array of values to control status of each thread, like this:
array_thread_status=1... (11 Replies)
Discussion started by: orangem
11 Replies
4. HP-UX
Hi,
Am new to HPUX . I need your assistance..
I had attached a Clariion(storage) LUN into HPUX machine, devices with 2GB(c8t0d0) and 1GB(c8t0d1) space. Later some point of time, detached these devices from HPUX machine and executed 'insf' command to build the new devices directory special... (4 Replies)
Discussion started by: raghu265
4 Replies
5. Programming
Hi All,
I have scenario where my callback function data_update() can be called anytime. I have written the function data_update() such that it will create detached thread for processing the data sent to this function.
data_update()
{
pthread_attr_t attr_thread;
... (1 Reply)
Discussion started by: wonderman
1 Replies
6. UNIX for Dummies Questions & Answers
Hey guys,
Just wondering is there anyway that I would be able to run a detached process that would continue to run regardless of me being logged into the linux host? (4 Replies)
Discussion started by: killaram
4 Replies
7. Solaris
I recently ran some patching on a Solaris 10 server and as per normal procedure I detached the LVM root disk mirrors first to preserve the pre-patching copy of the OS.
During the patching, I ran into some issues which I managed to resolve and completed the patching. However, I was looking around... (5 Replies)
Discussion started by: Grippo
5 Replies
LEARN ABOUT OSF1
pthread_exit
pthread_exit(3) Library Functions Manual pthread_exit(3)
NAME
pthread_exit - Terminates the calling thread.
LIBRARY
DECthreads POSIX 1003.1c Library (libpthread.so)
SYNOPSIS
#include <pthread.h>
void pthread_exit(
void *value_ptr);
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
IEEE Std 1003.1c-1995, POSIX System Application Program Interface
PARAMETERS
Value copied and returned to the caller of pthread_join(3). Note that void * is used as a universal datatype, not as a pointer. DEC-
threads treats the value_ptr as a value and stores it to be returned by pthread_join(3).
DESCRIPTION
This routine terminates the calling thread and makes a status value (value_ptr) available to any thread that calls pthread_join(3) and
specifies the terminating thread.
Any cleanup handlers that have been pushed and not yet popped from the stack, are popped in the reverse order that they were pushed and
then executed. After all cleanup handlers have been executed, appropriate destructor functions shall be called in an unspecified order if
the thread has any thread-specific data. Thread termination does not release any application-visible process resources, including, but not
limited to mutexes and file descriptors, nor does it perform any process-level cleanup actions, including, but not limited to calling any
atexit routine that may exist.
An implicit call to pthread_exit(3) is issued when a thread returns from the start routine that was used to create it. DECthreads writes
the function's return value as the return value in the thread's thread object. The process exits when the last running thread calls
pthread_exit(3).
After a thread has terminated, the result of access to local (that is, explicitly or implicitly declared auto) variables of the thread is
undefined. So, references to local variables of the existing thread should not be used for the value_ptr argument of the pthread_exit(3)
routine.
RETURN VALUES
None
ERRORS
None
RELATED INFORMATION
Functions: pthread_cancel(3), pthread_create(3), pthread_detach(3), pthread_join(3)
Manuals: Guide to DECthreads and Programmer's Guide
delim off
pthread_exit(3)