SHMEM\_LOCK - Online Linux Manual PageSection : 3
Updated : Jan 21, 2016
Source : 1.10.2
Note : Open MPI

NAMEshmem_set_lock(3), shmem_clear_lock(3), shmem_test_lock(3) − Releases, locks, and tests a mutual exclusion memory lock.

SYNOPSISC or C++: #include <mpp/shmem.h> void shmem_clear_lock(long *lock); void shmem_set_lock(long *lock); int shmem_test_lock(long *lock); Fortran: INCLUDE "mpp/shmem.fh" INTEGER lock, SHMEM_TEST_LOCK CALL SHMEM_CLEAR_LOCK(lock) CALL SHMEM_SET_LOCK(lock) I = SHMEM_TEST_LOCK(lock)

DESCRIPTIONThe shmem_set_lock routine sets a mutual exclusion lock after waiting for the lock to be freed by any other PE currently holding the lock. Waiting PEs are assured of getting the lock in a first−come, first−served manner. The shmem_clear_lock routine releases a lock previously set by shmem_set_lock after ensuring that all local and remote stores initiated in the critical region are complete. The shmem_test_lock function sets a mutual exclusion lock only if it is currently cleared. By using this function, a PE can avoid blocking on a set lock. If the lock is currently set, the function returns without waiting. These routines are appropriate for protecting a critical region from simultaneous update by multiple PEs. They accept the following arguments: lock  A symmetric data object that is a scalar variable or an array of length 1. This data object must be set to 0 on all processing elements (PEs) prior to the first use. lock must be of type integer. If you are using Fortran, it must be of default kind.

NOTESThe term symmetric data object is defined on intro_shmem(3)​.

RETURN VALUESThe shmem_test_lock function returns 0 if the lock was originally cleared and this call was able to set the lock. A value of 1 is returned if the lock had been set and the call returned without waiting to set the lock.

SEE ALSOintro_shmem(3)
0
Johanes Gumabo
Data Size   :   5,809 byte
man-shmem_clear_lock.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 236,715
Visitor ID   :     :  
Visitor IP   :   3.23.92.50   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (rof_escape_sequence|91|shmem_set_lock.3|14|\_LOCK" "3" "Jan 21, 2016" "1.10.2" "Open MPI" |.TH "SHMEM\\_LOCK" "3" "Jan 21, 2016" "1.10.2" "Open MPI" )