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.

man ipcrm.