PTHREAD_ATTR_SETDETACHSTATE(3P) POSIX Programmer's Manual PTHREAD_ATTR_SETDETACHSTATE(3P)PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond-
ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
NAME
pthread_attr_setdetachstate -- set the detachstate attribute
SYNOPSIS
#include <pthread.h>
int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate);
DESCRIPTION
Refer to pthread_attr_getdetachstate().
COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2013 Edition, Standard for Information Technol-
ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, Copyright (C) 2013 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. (This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Stan-
dard is the referee document. The original Standard can be obtained online at http://www.unix.org/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source
files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
IEEE /The Open Group 2013 PTHREAD_ATTR_SETDETACHSTATE(3P)
Check Out this Related Man Page
PTHREAD_ATTR_INIT(3P) POSIX Programmer's Manual PTHREAD_ATTR_INIT(3P)PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond-
ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
NAME
pthread_attr_init -- initialize the thread attributes object
SYNOPSIS
#include <pthread.h>
int pthread_attr_init(pthread_attr_t *attr);
DESCRIPTION
Refer to pthread_attr_destroy().
COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2013 Edition, Standard for Information Technol-
ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, Copyright (C) 2013 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. (This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Stan-
dard is the referee document. The original Standard can be obtained online at http://www.unix.org/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source
files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
IEEE /The Open Group 2013 PTHREAD_ATTR_INIT(3P)
I have this code...
#include <stdio.h>
#include <iostream>
#include <pthread.h>
static void* cliente(void *datos);
int main()
{
pthread_attr_t tattr;
int ret;
size_t size = PTHREAD_STACK_MIN + 0x0100;
ret = pthread_attr_init(&tattr);
ret =... (8 Replies)
I am getting the below given errors for the following program though all the variables have been declared and used appropriately. Please Help. The environment is AIX.
Error:
------
"gbsizeprofile.c", line 67.4: 1506-275 (S) Unexpected text 'void' encountered.
"gbsizeprofile.c", line 67.10:... (2 Replies)
Hi,
I have a UDP server and client program, and they must run within a program, so I decided two threads, one for UDP server and another for UDP client.
The simple architecture is shown in attachment.
However, I can't send the packets out on the UDP client, no any time message and... (2 Replies)
In this piece i implemented the gossip method. The first thread is invoked from inside the (msg is first sent from node -1 to 0 from main()) and the other threads are invoked from inside of the thread function itself. I used two mutexes and a condition variable to control the synchronization. ... (4 Replies)
In my program, threads may be created when some events trigger. So I can't create threads on initialization.
Theremore,I write a createThread() function to create thread. However, it is blocking at first call and don't run anymore? why?
#include <pthread.h>
#include <stdio.h>
#include... (4 Replies)
Hello everyone,
I created a test program for pthread priority set. Here's the code, very simple, 60 lines only.
I've tried this prog on my Fedora 13(on vbox), and on my 6410 arm linux 2.6.36. Both the same result.
Both environments are using root privileges.
Can any body tells me why the... (15 Replies)
I am trying the understand the conditional variable concept.
I went through the following site:
https://computing.llnl.gov/tutorials/pthreads/#ConditionVariables
I understand that condition variables allow threads to synchronize based upon the VALUE of data.
When the data acheives a particular... (2 Replies)
Suppose I declare
pthread_t clear_thread;
and then
pthread_create(&clear_thread, &detach, clear_message, this);
the thread is supposed to go away, perform the service it is intended to procide, and then kill itself.
A little while later, I require this service again, so I say
... (2 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
My problem is that when creating my producers and consumers, if I don't create an equal number of both, the... (12 Replies)