mirror of
https://gitee.com/openharmony/third_party_libuv
synced 2024-12-28 15:54:06 +00:00
commit
970364695f
@ -1699,17 +1699,16 @@ int uv_register_task_to_event(struct uv_loop_s* loop, uv_post_task func, void* h
|
||||
data = (struct uv_loop_data*)((uint64_t)data | (UV_EVENT_MAGIC_OFFSET << UV_EVENT_MAGIC_OFFSETBITS));
|
||||
loop->data = (void *)data;
|
||||
return 0;
|
||||
#endif
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
int uv_unregister_task_to_event(struct uv_loop_s* loop)
|
||||
{
|
||||
#if defined(__aarch64__)
|
||||
if (loop == NULL || loop->data == NULL)
|
||||
return -1;
|
||||
|
||||
if ((uint64_t)loop->data >> UV_EVENT_MAGIC_OFFSETBITS) != (uint64_t)(UV_EVENT_MAGIC_OFFSET))
|
||||
if (loop == NULL || loop->data == NULL ||
|
||||
((uint64_t)loop->data >> UV_EVENT_MAGIC_OFFSETBITS) != (uint64_t)(UV_EVENT_MAGIC_OFFSET))
|
||||
return -1;
|
||||
|
||||
loop->data = (struct uv_loop_data*)((uint64_t)loop->data -
|
||||
@ -1717,6 +1716,7 @@ int uv_unregister_task_to_event(struct uv_loop_s* loop)
|
||||
free(loop->data);
|
||||
loop->data = NULL;
|
||||
return 0;
|
||||
#endif
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
Loading…
Reference in New Issue
Block a user