Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: src/public/name_service.h

Issue 891603002: Removes the name service from the service runtime (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Fixes code review comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/public/imc_syscalls.h ('k') | src/trusted/debug_stub/target.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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_PUBLIC_NAME_SERVICE_H_
8 #define _NATIVE_CLIENT_SRC_PUBLIC_NAME_SERVICE_H_
9
10 #define NACL_NAME_SERVICE_CONNECTION_MAX 8
11
12 #define NACL_NAME_SERVICE_SUCCESS 0
13 #define NACL_NAME_SERVICE_NAME_NOT_FOUND 1
14 #define NACL_NAME_SERVICE_DUPLICATE_NAME 2
15 #define NACL_NAME_SERVICE_INSUFFICIENT_RESOURCES 3
16 #define NACL_NAME_SERVICE_PERMISSION_DENIED 4
17 #define NACL_NAME_SERVICE_INVALID_ARGUMENT 5
18
19 #define NACL_NAME_SERVICE_INSERT "insert:sih:i"
20 /* object name, max access mode, descriptor -> status */
21
22 #define NACL_NAME_SERVICE_DELETE "delete:s:i"
23 /* object name -> status */
24
25 #define NACL_NAME_SERVICE_LOOKUP_DEPRECATED "lookup:s:ih"
26 /*
27 * object name -> status, descriptor; flags curried to be RDONLY.
28 * deprecated; for ABI backward compatibility while TC and apps are
29 * updated.
30 */
31
32 #define NACL_NAME_SERVICE_LOOKUP "lookup:si:ih"
33 /* object name, flags -> status, descriptor */
34
35 #define NACL_NAME_SERVICE_TAKE_OWNERSHIP "take_ownership::"
36 /*
37 * make the name service immutable by all other connections. when the
38 * owner connection is closed, the name service may become writable to
39 * all again. does not have to be implemented by all name services.
40 */
41
42 /*
43 * Mode argument for insert and flags argument lookup must contain in
44 * the NACL_ABI_O_ACCMODE bit field one of
45 *
46 * NACL_ABI_O_RDONLY
47 * NACL_ABI_O_WRONLY
48 * NACL_ABI_O_RDWR
49 *
50 * and lookup flags argument may also contain any of
51 *
52 * NACL_ABI_O_CREAT
53 * NACL_ABI_O_TRUNC
54 * NACL_ABI_O_APPEND
55 *
56 * though whether the latter flag bits are supported or not depends on
57 * the name service.
58 *
59 * Connection capabilities should be looked up with O_RDWR. An fstat
60 * is required if client code needs to distinguish between a (file)
61 * descriptor for which the read and write syscalls work and a
62 * connection capability, though it's better to just attempt the
63 * syscall(s) and detect the failure.
64 *
65 * When lookup occurs and asks for RDONLY, if a name entry with that
66 * name with either RDONLY or RDWR mode exists, then that entry is
67 * returned; otherwise a NACL_NAME_SERVICE_NAME_NOT_FOUND or
68 * NACL_NAME_SERVICE_PERMISSION_DENIED status is returned.
69 */
70
71 #endif /* _NATIVE_CLIENT_SRC_PUBLIC_NAME_SERVICE_H_ */
OLDNEW
« no previous file with comments | « src/public/imc_syscalls.h ('k') | src/trusted/debug_stub/target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698