NtClose/NtReadFile skeleton.

This commit is contained in:
Ben Vanik
2013-10-15 22:28:00 -07:00
parent 388f354870
commit a8d10cd9d3
3 changed files with 69 additions and 6 deletions

View File

@@ -132,11 +132,8 @@ X_STATUS ObjectTable::RemoveHandle(X_HANDLE handle) {
} else {
ObjectTableEntry& entry = table_[slot];
if (entry.object) {
// Release after we lose the lock.
object = entry.object;
// Release the object handle now that it is out of the table.
object->ReleaseHandle();
object->Release();
} else {
result = X_STATUS_INVALID_HANDLE;
}
@@ -144,6 +141,12 @@ X_STATUS ObjectTable::RemoveHandle(X_HANDLE handle) {
xe_mutex_unlock(table_mutex_);
if (object) {
// Release the object handle now that it is out of the table.
object->ReleaseHandle();
object->Release();
}
return result;
}
@@ -175,5 +178,6 @@ X_STATUS ObjectTable::GetObject(X_HANDLE handle, XObject** out_object) {
xe_mutex_unlock(table_mutex_);
*out_object = object;
return result;
}