Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / native_client / src / untrusted / irt / irt_ppapi.h
1 /*
2  * Copyright (c) 2011 The Native Client Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6
7 #ifndef NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_PPAPI_H_
8 #define NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_PPAPI_H_ 1
9
10 #include <stddef.h>
11
12 #include "ppapi/c/ppp.h"
13
14 struct PP_StartFunctions {
15   int32_t (*PPP_InitializeModule)(PP_Module module_id,
16                                   PPB_GetInterface get_browser_interface);
17   void (*PPP_ShutdownModule)();
18   const void *(*PPP_GetInterface)(const char *interface_name);
19 };
20
21 struct PP_ThreadFunctions {
22   /*
23    * This is a cut-down version of pthread_create()/pthread_join().
24    * We omit thread creation attributes and the thread's return value.
25    *
26    * We use uintptr_t as the thread ID type because pthread_t is not
27    * part of the stable ABI; a user thread library might choose an
28    * arbitrary size for its own pthread_t.
29    */
30   int (*thread_create)(uintptr_t *tid,
31                        void (*func)(void *thread_argument),
32                        void *thread_argument);
33   int (*thread_join)(uintptr_t tid);
34 };
35
36 #endif