fs_ftrylockfile()

int  fs_ftrylockfile (FS_FILE  *p_file);

File

Called from

Code enabled by

fs_api.c

Application

FS_CFG_API_EN and FS_CFG_FILE_LOCK_EN

Acquire task ownership of a file (if available).

Arguments

p_file

Pointer to a file.

Returned Value

0, if no error occurs and the file lock is acquired.

Non-zero value, otherwise.

Notes/Warnings

  1. fs_ftrylockfile() is the non-blocking version of fs_flockfile(); if the lock is not available, the function returns an error.
  2. See fs_flockfile().