1 // Copyright 2017 The Fuchsia Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef ZIRCON_PROCESS_H_
6 #define ZIRCON_PROCESS_H_
7 
8 #include <zircon/types.h>
9 #include <stdint.h>
10 
11 __BEGIN_CDECLS
12 
13 // Accessors for Zircon-specific state maintained by the language runtime
14 
15 // Examines the set of handles received at process startup for one matching
16 // |hnd_info|.  If one is found, atomically returns it and removes it from the
17 // set available to future calls.
18 // |hnd_info| is a value returned by PA_HND().
19 zx_handle_t zx_take_startup_handle(uint32_t hnd_info);
20 
21 zx_handle_t _zx_thread_self(void);
22 zx_handle_t zx_thread_self(void);
23 
24 zx_handle_t _zx_process_self(void);
25 zx_handle_t zx_process_self(void);
26 
27 zx_handle_t _zx_vmar_root_self(void);
28 zx_handle_t zx_vmar_root_self(void);
29 
30 zx_handle_t _zx_job_default(void);
31 zx_handle_t zx_job_default(void);
32 
33 __END_CDECLS
34 
35 #endif // ZIRCON_PROCESS_H_
36