Lines Matching defs:handle
631 int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle) {
632 uv__handle_init(loop, (uv_handle_t*)handle, UV_FS_EVENT);
637 static int os390_regfileint(uv_fs_event_t* handle, char* path) {
642 ep = handle->loop->ep;
648 memcpy(reg_struct.__rfis_utok, &handle, sizeof(handle));
654 memcpy(handle->rfis_rftok, reg_struct.__rfis_rftok,
655 sizeof(handle->rfis_rftok));
661 int uv_fs_event_start(uv_fs_event_t* handle, uv_fs_event_cb cb,
666 if (uv__is_active(handle))
673 rc = os390_regfileint(handle, path);
679 uv__handle_start(handle);
680 handle->path = path;
681 handle->cb = cb;
687 int uv__fs_event_stop(uv_fs_event_t* handle) {
692 if (!uv__is_active(handle))
695 ep = handle->loop->ep;
701 memcpy(reg_struct.__rfis_rftok, handle->rfis_rftok,
702 sizeof(handle->rfis_rftok));
713 if (handle->path != NULL) {
714 uv__free(handle->path);
715 handle->path = NULL;
721 uv__handle_stop(handle);
727 int uv_fs_event_stop(uv_fs_event_t* handle) {
728 uv__fs_event_stop(handle);
733 void uv__fs_event_close(uv_fs_event_t* handle) {
738 * the handle, causing a use-after-free problem when the event is processed.
742 if (uv__fs_event_stop(handle) == 0)
743 uv__make_close_pending((uv_handle_t*) handle);
748 uv_fs_event_t* handle;
785 handle = *(uv_fs_event_t**)(msg.__rfim_utok);
786 assert(handle != NULL);
788 assert((handle->flags & UV_HANDLE_CLOSED) == 0);
789 if (uv__is_closing(handle)) {
790 uv__handle_stop(handle);
791 uv__make_close_pending((uv_handle_t*) handle);
793 } else if (handle->path == NULL) {
795 uv__handle_stop(handle);
804 assert(handle->path != NULL);
805 os390_regfileint(handle, handle->path);
806 handle->cb(handle, uv__basename_r(handle->path), events, 0);