added switch_file_lock and switch_file_unlock to the exposed functions from apr to be used to make FSCORE-14 jira ticket cross platform.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4343 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-02-21 18:39:10 +00:00
parent 5ca710d252
commit d90ca2f270

View File

@ -192,6 +192,25 @@ DoxyDefine(apr_status_t switch_file_open(switch_file_t **newf, const char *fname
DoxyDefine(apr_status_t switch_file_close(switch_file_t *file);)
#define switch_file_close apr_file_close
/**
* Establish a lock on the specified, open file. The lock may be advisory
* or mandatory, at the discretion of the platform. The lock applies to
* the file as a whole, rather than a specific range. Locks are established
* on a per-thread/process basis; a second lock by the same thread will not
* block.
* @param thefile The file to lock.
* @param type The type of lock to establish on the file.
*/
DoxyDefine(apr_status_t apr_file_lock(switch_file_t *thefile, int type);)
#define switch_file_lock apr_file_lock
/**
* Remove any outstanding locks on the file.
* @param thefile The file to unlock.
*/
DoxyDefine(apr_status_t apr_file_unlock(switch_file_t *thefile);)
#define switch_file_unlock apr_file_unlock
/**
* Delete the specified file.
* @param path The full path to the file (using / on all systems)