source: imaps-frontend/node_modules/@parcel/watcher/src/wasm/include.h@ 0c6b92a

main
Last change on this file since 0c6b92a was 0c6b92a, checked in by stefan toskovski <stefantoska84@…>, 5 weeks ago

Pred finalna verzija

  • Property mode set to 100644
File size: 3.5 KB
Line 
1/*
2Copyright Node.js contributors. All rights reserved.
3
4Permission is hereby granted, free of charge, to any person obtaining a copy
5of this software and associated documentation files (the "Software"), to
6deal in the Software without restriction, including without limitation the
7rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8sell copies of the Software, and to permit persons to whom the Software is
9furnished to do so, subject to the following conditions:
10
11The above copyright notice and this permission notice shall be included in
12all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20IN THE SOFTWARE.
21*/
22
23// Node does not include the headers for these functions when compiling for WASM, so add them here.
24#ifdef __wasm32__
25extern "C" {
26NAPI_EXTERN napi_status NAPI_CDECL
27napi_create_threadsafe_function(napi_env env,
28 napi_value func,
29 napi_value async_resource,
30 napi_value async_resource_name,
31 size_t max_queue_size,
32 size_t initial_thread_count,
33 void* thread_finalize_data,
34 napi_finalize thread_finalize_cb,
35 void* context,
36 napi_threadsafe_function_call_js call_js_cb,
37 napi_threadsafe_function* result);
38
39NAPI_EXTERN napi_status NAPI_CDECL napi_get_threadsafe_function_context(
40 napi_threadsafe_function func, void** result);
41
42NAPI_EXTERN napi_status NAPI_CDECL
43napi_call_threadsafe_function(napi_threadsafe_function func,
44 void* data,
45 napi_threadsafe_function_call_mode is_blocking);
46
47NAPI_EXTERN napi_status NAPI_CDECL
48napi_acquire_threadsafe_function(napi_threadsafe_function func);
49
50NAPI_EXTERN napi_status NAPI_CDECL napi_release_threadsafe_function(
51 napi_threadsafe_function func, napi_threadsafe_function_release_mode mode);
52
53NAPI_EXTERN napi_status NAPI_CDECL
54napi_unref_threadsafe_function(napi_env env, napi_threadsafe_function func);
55
56NAPI_EXTERN napi_status NAPI_CDECL
57napi_ref_threadsafe_function(napi_env env, napi_threadsafe_function func);
58
59NAPI_EXTERN napi_status NAPI_CDECL
60napi_create_async_work(napi_env env,
61 napi_value async_resource,
62 napi_value async_resource_name,
63 napi_async_execute_callback execute,
64 napi_async_complete_callback complete,
65 void* data,
66 napi_async_work* result);
67NAPI_EXTERN napi_status NAPI_CDECL napi_delete_async_work(napi_env env,
68 napi_async_work work);
69NAPI_EXTERN napi_status NAPI_CDECL napi_queue_async_work(napi_env env,
70 napi_async_work work);
71NAPI_EXTERN napi_status NAPI_CDECL napi_cancel_async_work(napi_env env,
72 napi_async_work work);
73}
74#endif
Note: See TracBrowser for help on using the repository browser.