sys_fhclose
Previous Topic  Next Topic 

Synopsis:

        sys_fhclose(file_handle)

Arguments:

        file_handle       -   The file handle to close


Description:    This function closes a handle previously opened by a call to sys_fhopen().    Any locks placed by fil_lock() using this handle will be unlocked.  Only files that have been opened by a specific task can be closed by that task - if an attempt is made to close a file opened by another task then an error is returned.


Note that if a task is stopped or is killed then all files opened by that task are automatically released.


Return Value


Returns 0 if the file was closed successfully or -1 if an invalid file handle is given.