ff_mutex_take

The ff_mutex_take function is for mutal exclusion control of file system object. It is called on the control enters file API to lock the volume.

int ff_mutex_take (
  int vol           /* [IN] Volume ID */
);

Parameter

vol
Volume ID in range from 0 to FF_VOLUMES. The value is used for the index of internal table of mutexes.

Return Values

A non-zero value is returned if the mutex has successfully been taken. If the mutex could not be taken within a time defined by FF_TIMEOUT, a zero is returned and the file function will abort with FR_TIMEOUT.

QuickInfo

This function is required when FF_FS_REENTRANT = 1.

Return