z/OS UNIX System Services File System Interface Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


osi_wakeup — Wake up OSI sleepers

z/OS UNIX System Services File System Interface Reference
SA23-2285-00

Function

The osi_wakeup service wakes up all threads that are sleeping in osi_sleep with a matching Resource_id and Pfs_id.

Requirements

Operation Environment
Authorization: Problem or supervisor state, any PSW key
Dispatchable unit mode: Task or SRB
Cross memory mode: Any
AMODE: 31-bit
ASC mode: Any
Interrupt status: Enabled for interrupts
Locks: Unlocked
Control parameters: All parameters must be addressable by the caller and in the primary address space.

Format

     osi_wakeup(Resource_id,
                Pfs_id,
                Return_value,
                Return_code,
                Reason_code);

Parameters

Resource_id
Supplied parameter
Type:
Token
Length:
Fullword

The Resource_id identifies the resource that is available. All osi_sleep services that are waiting for this Resource_id are to return to their callers.

Pfs_id
Supplied parameter
Type:
Token
Length:
Fullword

The Pfs_id identifies the calling PFS. The PFS receives its unique identifier from the LFS in the osi_pfsid field of the OSI structure on each VFS and vnode operation. This identifier is also passed as pfsi_pfsid during PFS initialization, and the initialization value may be used instead of the OSI value that is saved from osi_sleep.

Return_value
Returned parameter
Type:
Integer
Length:
Fullword
The name of a fullword in which the osi_wakeup service returns the results of the operation, as one of the following:
Return_value
Meaning
-1
The operation was not successful.
0 or greater
The operation was successful; the value represents the number of sleeping tasks that were awakened.
Return_code
Returned parameter
Type:
Integer
Length:
Fullword

The name of a fullword in which the osi_wakeup service stores the return code. The osi_wakeup service returns Return_code only if Return_value is -1. Reason_code further qualifies Return_code.

Reason_code
Returned parameter
Type:
Integer
Length:
Fullword

A fullword in which the osi_wakeup service stores the reason code. The osi_wakeup service returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value.

Usage notes

  1. For additional information, see Waiting and posting.
  2. Before calling osi_sleep, the PFS must copy the osi_pfsid value to a location that is addressable by the task that is to call osi_wakeup. It must be passed as the Pfs_id on osi_wakeup. The osi_pfsid value that is passed to the PFS is the same for all operations of this PFS. It is also passed as pfsi_pfsid during PFS initialization. This initialization value may be used on osi_wakeup instead of the OSI value that is saved from osi_sleep.
  3. The osi_wakeup service does not wake up a task that is not currently sleeping. If osi_wakeup is issued before osi_sleep for the same resource, the task sleeps until the next osi_wakeup for that resource. Therefore, the PFS must have sufficient logic and recovery to ensure that sleeping tasks will eventually be awakened.
  4. The address of the osi_wakeup routine is passed to the PFS in the OSIT structure when the PFS is initialized.

Characteristics and restrictions

The caller of this service must be on a process thread.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014