CMPI 2.1.0 API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Variables
OS Encapsulation Services - POSIX-conformant Mutexes (Subclause 9.14)

Variables

CMPI_MUTEX_TYPE(* CMPIBrokerExtFT::newMutex )(int opt)
 Create a POSIX threading-conformant mutex. More...
 
void(* CMPIBrokerExtFT::destroyMutex )(CMPI_MUTEX_TYPE mutex)
 Destroy a POSIX threading-conformant mutex. (Deprecated) More...
 
void(* CMPIBrokerExtFT::lockMutex )(CMPI_MUTEX_TYPE mutex)
 Lock a POSIX threading-conformant mutex. (Deprecated) More...
 
void(* CMPIBrokerExtFT::unlockMutex )(CMPI_MUTEX_TYPE mutex)
 Unlock a POSIX threading-conformant mutex. (Deprecated) More...
 
int(* CMPIBrokerExtFT::destroyMutex2 )(CMPI_MUTEX_TYPE mutex)
 Destroy a POSIX threading-conformant mutex. More...
 
int(* CMPIBrokerExtFT::lockMutex2 )(CMPI_MUTEX_TYPE mutex)
 Lock a POSIX threading-conformant mutex. More...
 
int(* CMPIBrokerExtFT::unlockMutex2 )(CMPI_MUTEX_TYPE mutex)
 Unlock a POSIX threading-conformant mutex. More...
 

Detailed Description

Variable Documentation

CMPI_MUTEX_TYPE(* CMPIBrokerExtFT::newMutex)(int opt)

Create a POSIX threading-conformant mutex.

CMPIBrokerExtFT.newMutex() creates a POSIX threading-conformant mutex.

The mutex that is created shall be of a type that exhibits the following behavior:

  • For locking a locked mutex: A thread that holds a lock on a mutex and attempts to lock that mutex again without first unlocking it shall succeed in locking the mutex. Multiple locks of the mutex (by the same thread) shall require the same number of unlocks (by that same thread) to release the mutex before another thread can acquire the mutex.
  • For unlocking an unlocked mutex: A thread attempting to unlock a mutex that is not locked by that thread (that is, the mutex is either entirely unlocked or locked by another thread) shall fail in unlocking the mutex.

This behavior is consistent with mutex type PTHREAD_MUTEX_RECURSIVE defined in IEEE 1003.1.

Parameters
optFor future use. It should be ignored by the MB, and MIs should pass a value of 0.
Returns

If successful, the handle of the new mutex will be returned.

If not successful, NULL will be returned.

Errors
For historical reasons, no additional error information is passed back.
Convenience Function
None.
Capabilities:
Part of the OS Encapsulation Services capability.
Requirement Change:
Required to be supported since CMPI 2.0.
Change:
In CMPI 2.1, changed opt to be for future use.
Change:
In CMPI 2.1, required that the mutex behaves consistent with mutex type PTHREAD_MUTEX_RECURSIVE defined in IEEE 1003.1.
void(* CMPIBrokerExtFT::destroyMutex)(CMPI_MUTEX_TYPE mutex)

Destroy a POSIX threading-conformant mutex. (Deprecated)

CMPIBrokerExtFT.destroyMutex() destroys a POSIX threading-conformant mutex.

Parameters
mutexHandle of the mutex to be destroyed.
Convenience Function
None.
Capabilities:
Part of the OS Encapsulation Services capability.
Requirement Change:
Required to be supported since CMPI 2.0.
Deprecated:
This function is deprecated since CMPI 2.1, because it does not indicate whether it succeeded or failed. Use CMPIBrokerExtFT.destroyMutex2() instead.
void(* CMPIBrokerExtFT::lockMutex)(CMPI_MUTEX_TYPE mutex)

Lock a POSIX threading-conformant mutex. (Deprecated)

CMPIBrokerExtFT.lockMutex() locks a POSIX threading-conformant mutex.

If the mutex is locked by another thread, the current thread is suspended until the lock is granted.

The behavior in case the mutex is already locked by the current thread is defined in the description of CMPIBrokerExtFT.newMutex().

Parameters
mutexHandle of the mutex to be locked.
Returns
None.
Errors
For historical reasons, this function does not indicate whether it succeeded or failed.
Convenience Function
None.
Capabilities:
Part of the OS Encapsulation Services capability.
Requirement Change:
Required to be supported since CMPI 2.0.
Deprecated:
This function is deprecated since CMPI 2.1, because it does not indicate whether it succeeded or failed. Use CMPIBrokerExtFT.lockMutex2() instead.
void(* CMPIBrokerExtFT::unlockMutex)(CMPI_MUTEX_TYPE mutex)

Unlock a POSIX threading-conformant mutex. (Deprecated)

CMPIBrokerExtFT.unlockMutex() unlocks a POSIX threading-conformant mutex.

The behavior in case the mutex is not locked by the current thread is defined in the description of CMPIBrokerExtFT.newMutex().

Parameters
mutexHandle of the mutex to be unlocked.
Returns
None.
Errors
For historical reasons, this function does not indicate whether it succeeded or failed.
Convenience Function
None.
Capabilities:
Part of the OS Encapsulation Services capability.
Requirement Change:
Required to be supported since CMPI 2.0.
Deprecated:
This function is deprecated since CMPI 2.1, because it does not indicate whether it succeeded or failed. Use CMPIBrokerExtFT.unlockMutex2() instead.
int(* CMPIBrokerExtFT::destroyMutex2)(CMPI_MUTEX_TYPE mutex)

Destroy a POSIX threading-conformant mutex.

CMPIBrokerExtFT.destroyMutex2() destroys a POSIX threading-conformant mutex.

Parameters
mutexHandle of the mutex to be destroyed.
Returns

If successful, zero will be returned.

If not successful, a non-zero error code will be returned.

Errors
Error codes are defined in errno.h, specifically for the pthread_mutex_destroy() function; both are defined in IEEE 1003.1.
Convenience Function
None.
Capabilities:
Part of the OS Encapsulation Services capability.
Addition:
Added in CMPI 2.1. Supersedes the deprecated CMPIBrokerExtFT.destroyMutex() function.
Requirement Change:
Required to be supported since CMPI 2.1.
int(* CMPIBrokerExtFT::lockMutex2)(CMPI_MUTEX_TYPE mutex)

Lock a POSIX threading-conformant mutex.

CMPIBrokerExtFT.lockMutex2() locks a POSIX threading conformant mutex.

If the mutex is locked by another thread, the current thread is suspended until the lock is granted.

The behavior in case the mutex is already locked by the current thread is defined in the description of CMPIBrokerExtFT.newMutex().

Parameters
mutexHandle of the mutex to be locked.
Returns

If successful, zero will be returned.

If not successful, a non-zero error code will be returned.

Errors
Error codes are defined in errno.h, specifically for the pthread_mutex_lock() function; both are defined in IEEE 1003.1.
Convenience Function
None.
Capabilities:
Part of the OS Encapsulation Services capability.
Addition:
Added in CMPI 2.1. Supersedes the deprecated CMPIBrokerExtFT.lockMutex() function.
Requirement Change:
Required to be supported since CMPI 2.1.
int(* CMPIBrokerExtFT::unlockMutex2)(CMPI_MUTEX_TYPE mutex)

Unlock a POSIX threading-conformant mutex.

CMPIBrokerExtFT.unlockMutex2() unlocks a POSIX threading conformant mutex.

The behavior in case the mutex is not locked by the current thread is defined in the description of CMPIBrokerExtFT.newMutex().

Parameters
mutexHandle of the mutex to be unlocked.
Returns

If successful, zero will be returned.

If not successful, a non-zero error code will be returned.

Errors
Error codes are defined in errno.h, specifically for the pthread_mutex_lock() function; both are defined in IEEE 1003.1.
Convenience Function
None.
Capabilities:
Part of the OS Encapsulation Services capability.
Addition:
Added in CMPI 2.1. Supersedes the deprecated CMPIBrokerExtFT.unlockMutex() function.
Requirement Change:
Required to be supported since CMPI 2.1.