Sponsored Content
Operating Systems Linux Linux Processes, Threads, scheduling header files Post 302527189 by Corona688 on Thursday 2nd of June 2011 06:45:16 PM
Old 06-02-2011
A process is a software concept, not a header file. What 'scheduling' could mean here is ambiguous but if you mean for threads, just falls in with threads. Threading at least is an easy answer, pthread.h
 

7 More Discussions You Might Find Interesting

1. Programming

File access from multiple processes or threads?

Hi, Can anyone give me any idea when multiple processes access a file (like opening it, modifying it etc.) how can the synchronization can be done if they can access the same file at any time? How can this scenario is different from when multiple threads access a same file, modifying it etc- in... (7 Replies)
Discussion started by: sanzee
7 Replies

2. UNIX for Dummies Questions & Answers

Copy files in Multiple Threads

Hello all, I have a directory of files of varying sizes. I want to copy all these files in n number of threads to another directory such that each copy set is more or less the same size. Example : Say /mydirA It has around say 23 files of various sizes. Number of copy... (0 Replies)
Discussion started by: samoo
0 Replies

3. UNIX for Advanced & Expert Users

Monitoring cpu usage of mysql processes/threads/queries without any tool

hi all, i want to monitor mysql processes/threads/queries with respect to cpu usage.how can i do it? show processlist is of no use as no information abt cpu usage is given. plz help (7 Replies)
Discussion started by: rohitmahambre
7 Replies

4. UNIX for Dummies Questions & Answers

Merge all csv files in one folder considering only 1 header row and ignoring header of all others

Friends, I need help with the following in UNIX. Merge all csv files in one folder considering only 1 header row and ignoring header of all other files. FYI - All files are in same format and contains same headers. Thank you (4 Replies)
Discussion started by: Shiny_Roy
4 Replies

5. UNIX for Advanced & Expert Users

How to check number of threads running per processor in Linux machine?

I have a machine which has 32 processor but i am really not sure how many threads are running. It has hyperthreading enabled. Is there a way i can find that all 32 processors are being used and how many threads are there in my linux box. Its a 64 bit processor. I am having very high load average... (3 Replies)
Discussion started by: Moon1234
3 Replies

6. UNIX for Dummies Questions & Answers

Checking for processes in Linux

I want to check processes on my Linux server Normally we do a ps-ef|grep "search code" Now we want to check for certain processes which are up and running and we want to get an email, whenever the processes we are checking goes down? How can i implement this? (1 Reply)
Discussion started by: saggiboy10
1 Replies

7. What is on Your Mind?

Similar Threads: More UNIX and Linux Forum Topics You Might Find Helpful Update

Today I change the DB and the PHP code and rebuilt the database for similar threads at the end of each post, increasing from a max of 5 to a max of 10 similar threads per post: More UNIX and Linux Forum Topics You Might Find Helpful It was quite easy to do: 1. Increased the max size of... (17 Replies)
Discussion started by: Neo
17 Replies
PTHREAD_BARRIERATTR(3)					   BSD Library Functions Manual 				    PTHREAD_BARRIERATTR(3)

NAME
pthread_barrierattr_destroy, pthread_barrierattr_getpshared, pthread_barrierattr_init, pthread_barrierattr_setpshared -- manipulate a barrier attribute object LIBRARY
POSIX Threads Library (libpthread, -lpthread) SYNOPSIS
#include <pthread.h> int pthread_barrierattr_destroy(pthread_barrierattr_t *attr); int pthread_barrierattr_getpshared(const pthread_barrierattr_t *attr, int *pshared); int pthread_barrierattr_init(pthread_barrierattr_t *attr); int pthread_barrierattr_setpshared(pthread_barrierattr_t *attr, int pshared); DESCRIPTION
The pthread_barrierattr_init() function will initialize attr with default attributes. The pthread_barrierattr_destroy() function will destroy attr and release any resources that may have been allocated on its behalf. The pthread_barrierattr_getpshared() function will put the value of the process-shared attribute from attr into the memory area pointed to by pshared. The pthread_barrierattr_setpshared() function will set the process-shared attribute of attr to the value specified in pshared. The argument pshared may have one of the following values: PTHREAD_PROCESS_PRIVATE The barrier object it is attached to may only be accessed by threads in the same process as the one that created the object. PTHREAD_PROCESS_SHARED The barrier object it is attached to may be accessed by threads in processes other than the one that created the object. RETURN VALUES
If successful, all these functions will return zero. Otherwise, an error number will be returned to indicate the error. None of these functions will return EINTR. ERRORS
The pthread_barrierattr_destroy(), pthread_barrierattr_getpshared() and pthread_barrierattr_setpshared() functions may fail if: [EINVAL] The value specified by attr is invalid. The pthread_barrierattr_init() function will fail if: [ENOMEM] Insufficient memory to initialize the barrier attribute object attr. The pthread_barrierattr_setpshared() function will fail if: [EINVAL] The value specified in pshared is not one of the allowed values. SEE ALSO
pthread_barrier_destroy(3), pthread_barrier_init(3), pthread_barrier_wait(3) HISTORY
The pthread_barrierattr_*() functions first appeared in N:M Threading Library (libkse, -lkse) in FreeBSD 5.2, and in 1:1 Threading Library (libthr, -lthr) in FreeBSD 5.3. BUGS
The implementation of barriers does not fully conform to IEEE Std 1003.2 (``POSIX.2'') because the process-shared attribute is ignored in 1:1 Threading Library (libthr, -lthr), and in N:M Threading Library (libkse, -lkse); if any value other than PTHREAD_PROCESSES_PRIVATE is speci- fied in a call to pthread_barrierattr_setpshared(), it will return EINVAL. BSD
February 19, 2004 BSD
All times are GMT -4. The time now is 07:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy