Obtain an ODM lock for the specified file
#include <diag/odmi.h> int diag_lock(char *file)
The diag_lock subroutine calls odm_lock() for a specified file. It waits 5 seconds if a lock cannot be immediately granted.
| Parameter | Description |
|---|---|
| file | Name of the file to lock |
The diag_lock subroutine returns one of the following values:
| Return Code | Description |
|---|---|
| >0 | If successful |
| 0 | File is already locked |
| -1 | Error |