4 #include "mono/io-layer/wapi.h"
5 #include "wapi-private.h"
6 #include "handles-private.h"
8 guint32 _wapi_handle_count_signalled(GPtrArray *handles)
12 /* Count how many of the interesting thread handles are signalled */
13 for(i=0; i<handles->len; i++) {
16 handle=(WapiHandle *)g_ptr_array_index(handles, i);
18 g_message(G_GNUC_PRETTY_FUNCTION ": Checking handle %p",
22 if(handle->signalled==TRUE) {
24 g_message(G_GNUC_PRETTY_FUNCTION
25 ": Thread %p signalled", handle);
32 g_message(G_GNUC_PRETTY_FUNCTION ": %d signalled handles", ret);
40 * @handle: The handle to release
42 * Closes and invalidates @handle, releasing any resources it
43 * consumes. When the last handle to a temporary or non-persistent
44 * object is closed, that object can be deleted. Closing the same
45 * handle twice is an error.
47 * Return value: %TRUE on success, %FALSE otherwise.
49 gboolean CloseHandle(WapiHandle *handle)
51 g_return_val_if_fail(handle->ref>0, FALSE);
55 if(handle->ops->close!=NULL) {
56 handle->ops->close(handle);
59 g_free(handle); /* maybe this should be in
60 * ops, cuurently ops->close()
61 * is being used to free