Beispiel #1
0
void filemap_release(struct file *file)
{
	assert(file->status == FD_OPENED || file->status == FD_CLOSED);
	assert(fopen_count(file) > 0);
	if (fopen_count_dec(file) == 0) {
		filemap_free(file);
	}
}
Beispiel #2
0
// fd_array_close - file's open_count--; if file's open_count-- == 0 , then call fd_array_free to free this file item
void
fd_array_close(struct file *file) {
    assert(file->status == FD_OPENED);
    assert(fopen_count(file) > 0);
    file->status = FD_CLOSED;
    if (fopen_count_dec(file) == 0) {
        fd_array_free(file);
    }
}
Beispiel #3
0
void filemap_release(struct file *file)
{
	assert(fopen_count(file) > 0);
	fopen_count_dec(file);
}