Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_sunlock( <csemaphore>|.t. ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_SUNLOCK( <cSemaphore>|.T. )


Parameters

<cSemaphore>
Name of semaphore lock to release.

.T.
Alternatively, release all semaphore locks created by the station.


Returns

Logical true if successful, false otherwise. If the function returns 
false, you can call N_ERROR(), which will return the NetWare error 
code.


Description

N_SUNLOCK(<cSemaphore>) releases a specified semaphore lock, thus 
allowing it to be locked by other stations.

N_SUNLOCK(.T.) releases all semaphore locks created by the station.

This function has no effect on locks applied with RLOCK() or FLOCK(), 
nor has it any effect on semaphore locks issued by other stations.

Issuing N_SUNLOCK() on a semaphore that has not been locked has no 
effect.


Example

// Lock memory file while being read and updated
DO WHILE ! N_SLOCK('Unique.mem')
ENDDO
RESTORE FROM unique.mem ADDITIVE
unique_num = unique_num + 1
SAVE TO Unique.mem ALL LIKE unique_num
N_SUNLOCK('Unique.mem')



See Also: N_SLOCK()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson