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

Side by Side Diff: src/trusted/gio/gio_shm.h

Issue 594733005: Cleanup: Remove src/trusted/gio/, since it is unused (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Fix Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/trusted/gio/gio_nacl_desc_test.c ('k') | src/trusted/gio/gio_shm.c » ('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) 2012 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 /*
8 * Subclass of the gio object for use in trusted code, providing I/O
9 * services to a shared memory object.
10 */
11
12 #ifndef NATIVE_CLIENT_SRC_TRUSTED_GIO_WRAPPED_DESC_GIO_SHM_H_
13 #define NATIVE_CLIENT_SRC_TRUSTED_GIO_WRAPPED_DESC_GIO_SHM_H_
14
15 #include "native_client/src/include/nacl_base.h"
16
17 #include "native_client/src/shared/gio/gio.h"
18
19 EXTERN_C_BEGIN
20
21 struct NaClDesc;
22
23 struct NaClGioShm {
24 /* public */
25 struct Gio base;
26 struct NaClDesc *shmp;
27 /*
28 * the shmp is public for e.g. xferring via nrd_xfer
29 */
30
31 size_t io_offset;
32 size_t shm_sz;
33 char *cur_window;
34 size_t window_offset;
35 size_t window_size;
36 };
37
38 /*
39 * Create a Gio object backed by a NaClDesc -- any NaClDesc objects
40 * for which the Map virtual function is usable. The shm_size is the
41 * size of the file data in the shm object -- so the requirement is
42 * that *shmp object's size is at least shm_size (and it would
43 * normally be, since the object size is rounded to
44 * NACL_MAP_PAGESIZE). The shm_size value is used to limit Seek and
45 * to know when to report EOF on Read.
46 *
47 * The NaClGioShm object is read-only. It takes a reference to the
48 * shmp when constructed, and releases a reference on destruction.
49 */
50 int NaClGioShmCtor(struct NaClGioShm *self,
51 struct NaClDesc *shmp,
52 size_t shm_size);
53
54 int NaClGioShmAllocCtor(struct NaClGioShm *self,
55 size_t shm_size);
56
57 /* Dtor is a virtual function */
58
59 EXTERN_C_END
60
61 #endif /* NATIVE_CLIENT_SRC_TRUSTED_GIO_WRAPPED_DESC_GIO_SHM_H_ */
OLDNEW
« no previous file with comments | « src/trusted/gio/gio_nacl_desc_test.c ('k') | src/trusted/gio/gio_shm.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698