11-22-2008
List of suspended tasks on a semaphore/message queue
Hi,
I have created a posix semaphore.
Is it possible to have a functionality, wherein I can reset the semaphore.
ie All the tasks waiting for the semaphore will be signalled and will return with error values and the semaphore value will be set to its initial value.
Is there a way to get a list of the tasks that are waiting for the posix semaphore and then send signals to them?
Likewise, is there a way to clear a message queue created using the System V Call, of all its messages and signal to tasks waiting on that queue to return back?
Please provide some solutions.
Thanks.
Taklu.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
I am working closly with unix message queues i have encountered the following -
after creating the Q and start working with it (pushing & pulling) i receive the following stange parameters on the q's -
STIME=no_entry
Qnum=0
CBYTES=4140
when this happens, the Q is disabled (meaning i... (3 Replies)
Discussion started by: kel
3 Replies
2. Programming
Hi there:
Thanks first. When I use a message queue amony severl processes, will I have to synchronize the queue? I don't think I would have to because a message queue is implemented in a link listed. Correct me If I am wrong... (0 Replies)
Discussion started by: yanhu
0 Replies
3. Programming
Is there any way one can delete , say , a particular message from a message queue on system V? (2 Replies)
Discussion started by: satansfury
2 Replies
4. Programming
Hello,
i need to write a message queue "chat server", that should work only localy.
Can anyone please help me with some ideas and peshaps code. I'm studying the UNIX IPC mechanisms right now. So far, i understand how it works but i still cannot get an idea how to write a chat programm...
... (2 Replies)
Discussion started by: etenv
2 Replies
5. Programming
Hii can anyone pls tell how to limit the max no of message in a posix message queue. I have made changes in proc/sys/fs/mqueue/msg_max
But still whenever i try to read the value of max. message in the queue using attr.mq_curmsgs (where struct mq_attr attr) its giving the default value as 10.... (0 Replies)
Discussion started by: mohit3884
0 Replies
6. Programming
Hi all,
I need help about message queues, i have a server-client program that communicates each other via msg queue, firstly server opens its msg queue and waits for msg then client opens server msg queue and its own msg queue(for receiving msg from server,clients sends msg to server msg... (7 Replies)
Discussion started by: SaTYR
7 Replies
7. Programming
Hello !!!!! I have a simple question but i can't find the answer anywhere hope to meet it here.
Why it is a bad idea to pass pointers through message queues ?
Most structs i see all of their char types are arrays... Is it becase having pointers means we could possibily send wrong bytes ?
For... (2 Replies)
Discussion started by: qlyine
2 Replies
8. Ubuntu
Hello
How can I see the created message queues in the system? (4 Replies)
Discussion started by: xyzt
4 Replies
9. Filesystems, Disks and Memory
Hello,
On 4/20/2018, we performed a disk replacement on our IBM 8202 P7 server. After the disk was rebuilt, the SAS Disk Array sissas0 showed a status of degraded. However, the pdisks in the array all show a status of active.
We did see a message in errpt. DISK ARRAY PROTECTION SUSPENDED.
... (1 Reply)
Discussion started by: terrya
1 Replies
10. AIX
Hello,
On 4/20/2018, we performed a disk replacement on our IBM 8202 P7 server. After the disk was rebuilt, the SAS Disk Array sissas0 showed a status of degraded. However, the pdisks in the array all show a status of active.
We did see a message in errpt. DISK ARRAY PROTECTION SUSPENDED.
... (3 Replies)
Discussion started by: terrya
3 Replies
LEARN ABOUT OPENSOLARIS
semaphore.h
semaphore.h(3HEAD) Headers semaphore.h(3HEAD)
NAME
semaphore.h, semaphore - semaphores
SYNOPSIS
#include <semaphore.h>
DESCRIPTION
The <semaphore.h> header defines the sem_t type, used in performing semaphore operations. The semaphore can be implemented using a file
descriptor, in which case applications are able to open up at least a total of {OPEN_MAX} files and semaphores. The symbol SEM_FAILED is
defined (see sem_open(3C)).
Inclusion of the <semaphore.h> header can make visible symbols defined in the headers <fcntl.h> and <sys/types.h>. See fcntl.h(3HEAD) and
types.h(3HEAD).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|Standard |See standards(5). |
+-----------------------------+-----------------------------+
SEE ALSO
fcntl.h(3HEAD), types.h(3HEAD), sem_destroy(3C), sem_getvalue(3C), sem_init(3C), sem_open(3C), sem_post(3C), sem_timedwait(3C),
sem_unlink(3C), sem_wait(3C), attributes(5), standards(5)
SunOS 5.11 5 Feb 2008 semaphore.h(3HEAD)