Home
last modified time | relevance | path

Searched refs:handle (Results 1 – 25 of 113) sorted by relevance

12345

/trusty/kernel/lib/trusty/
Dhandle.c43 void handle_init_etc(struct handle* handle, in handle_init_etc() argument
46 DEBUG_ASSERT(handle); in handle_init_etc()
50 refcount_init(&handle->refcnt); in handle_init_etc()
51 handle->flags = flags; in handle_init_etc()
52 handle->ops = ops; in handle_init_etc()
53 handle->wait_event = NULL; in handle_init_etc()
54 spin_lock_init(&handle->slock); in handle_init_etc()
55 handle->cookie = NULL; in handle_init_etc()
56 list_clear_node(&handle->hlist_node); in handle_init_etc()
57 list_initialize(&handle->waiter_list); in handle_init_etc()
[all …]
Dhandle_set.c55 struct handle handle; member
60 static uint32_t hset_poll(struct handle* handle, uint32_t emask, bool finalize);
61 static void hset_destroy(struct handle* handle);
70 static inline bool is_handle_set(struct handle* h) { in is_handle_set()
75 static inline struct handle_set* handle_to_handle_set(struct handle* h) { in handle_to_handle_set()
77 return containerof(h, struct handle_set, handle); in handle_to_handle_set()
80 static uint32_t hset_poll(struct handle* h, uint32_t emask, bool finalize) { in hset_poll()
94 DEBUG_ASSERT(ref->parent == &hset->handle); in hset_detach_ref_locked()
97 handle_del_waiter(ref->handle, &ref->waiter); in hset_detach_ref_locked()
100 spin_lock_save(&hset->handle.slock, &state, SLOCK_FLAGS); in hset_detach_ref_locked()
[all …]
Dmemref.c50 struct handle handle; member
61 static void memref_handle_destroy(struct handle* memref_handle) { in memref_handle_destroy()
63 struct memref* memref = containerof(memref_handle, struct memref, handle); in memref_handle_destroy()
67 static status_t memref_mmap(struct handle* handle, in memref_mmap() argument
72 DEBUG_ASSERT(handle); in memref_mmap()
78 struct memref* memref = containerof(handle, struct memref, handle); in memref_mmap()
139 handle_init_etc(&memref->handle, &memref_handle_ops, 0); in memref_create()
169 struct handle** handle) { in memref_create_from_vmm_obj() argument
184 *handle = &memref->handle; in memref_create_from_vmm_obj()
189 handle_decref(&memref->handle); in memref_create_from_vmm_obj()
[all …]
Ductx.c58 struct handle* handle; member
70 struct handle* hset_all;
169 ASSERT(&ctx->htbl[idx].handle); in _check_handle_id()
174 static struct handle* remove_handle(struct uctx* ctx, int idx) { in remove_handle()
175 struct handle* h; in remove_handle()
179 h = ctx->htbl[idx].handle; in remove_handle()
189 handle_decref(ref->handle); in remove_handle()
193 ctx->htbl[idx].handle = NULL; in remove_handle()
203 static int _hset_add_handle(struct handle* hset, in _hset_add_handle()
204 struct handle* h, in _hset_add_handle()
[all …]
Devent.c136 struct handle handle; member
149 struct handle handle; member
158 static uint32_t event_source_poll(struct handle* handle,
161 static void event_source_destroy(struct handle* handle);
163 static uint32_t event_client_poll(struct handle* handle,
166 static void event_client_destroy(struct handle* handle);
168 static ssize_t event_client_user_readv(struct handle* h,
171 static ssize_t event_client_user_writev(struct handle* handle,
192 static struct event_source* handle_to_event_source(struct handle* h) { in handle_to_event_source()
195 return containerof(h, struct event_source, handle); in handle_to_event_source()
[all …]
Dipc.c59 static uint32_t port_poll(struct handle* handle, uint32_t emask, bool finalize);
60 static void port_shutdown(struct handle* handle);
61 static void port_handle_destroy(struct handle* handle);
63 static uint32_t chan_poll(struct handle* handle, uint32_t emask, bool finalize);
64 static void chan_handle_destroy(struct handle* handle);
85 bool ipc_is_channel(struct handle* handle) { in ipc_is_channel() argument
86 return likely(handle->ops == &ipc_chan_handle_ops); in ipc_is_channel()
89 bool ipc_is_port(struct handle* handle) { in ipc_is_port() argument
90 return likely(handle->ops == &ipc_port_handle_ops); in ipc_is_port()
137 struct handle** phandle_ptr) { in ipc_port_create()
[all …]
/trusty/kernel/lib/trusty/include/lib/trusty/
Dhandle.h55 struct handle { struct
114 struct handle* parent;
115 struct handle* handle; member
122 uint32_t (*poll)(struct handle* handle, uint32_t emask, bool finalize);
123 void (*shutdown)(struct handle* handle);
124 void (*destroy)(struct handle* handle);
125 ssize_t (*user_writev)(struct handle* handle,
128 ssize_t (*user_readv)(struct handle* handle,
131 status_t (*mmap)(struct handle* handle,
151 void handle_init_etc(struct handle* handle,
[all …]
Dipc.h64 struct handle handle; member
106 struct handle handle; member
135 struct handle** phandle_ptr);
138 int ipc_port_publish(struct handle* phandle);
141 int ipc_port_accept(struct handle* phandle,
142 struct handle** chandle_ptr,
173 struct handle** chandle_ptr);
175 bool ipc_is_channel(struct handle* handle);
176 bool ipc_is_port(struct handle* handle);
Dmemref.h52 struct handle** handle);
76 struct handle** handle);
88 struct vmm_obj* memref_handle_to_vmm_obj(struct handle* handle);
Devent.h88 struct handle** ph);
99 int event_source_publish(struct handle* h);
115 struct handle** ph);
138 int event_source_signal(struct handle* h);
150 int event_client_notify_handled(struct handle* h);
Dhandle_set.h35 struct handle* handle_set_create(void);
37 int handle_set_attach(struct handle* h, struct handle_ref* ref);
45 int handle_set_wait(struct handle* h,
49 bool handle_set_ready(struct handle* h);
Ductx.h45 struct handle* handle,
49 struct handle** handle_ptr);
52 struct handle** handle_ptr);
Dipc_msg.h58 struct handle** handles;
81 int ipc_get_msg(struct handle* chandle, struct ipc_msg_info* msg_info);
82 int ipc_read_msg(struct handle* chandle,
86 int ipc_put_msg(struct handle* chandle, uint32_t msg_id);
87 int ipc_send_msg(struct handle* chandle, struct ipc_msg_kern* msg);
/trusty/user/base/lib/libc-trusty/
Dipc.c32 handle_t accept(handle_t handle, struct uuid* peer_uuid) { in accept() argument
33 return _trusty_accept(handle, peer_uuid); in accept()
36 int close(handle_t handle) { in close() argument
37 return _trusty_close(handle); in close()
40 int set_cookie(handle_t handle, void* cookie) { in set_cookie() argument
41 return _trusty_set_cookie(handle, cookie); in set_cookie()
48 int handle_set_ctrl(handle_t handle, uint32_t cmd, struct uevent* evt) { in handle_set_ctrl() argument
49 return _trusty_handle_set_ctrl(handle, cmd, evt); in handle_set_ctrl()
52 int wait(handle_t handle, struct uevent* event, uint32_t timeout_msecs) { in wait() argument
53 return _trusty_wait(handle, event, timeout_msecs); in wait()
[all …]
/trusty/user/app/storage/test/storage-unittest/
Dmain.c144 static int WriteZeroChunk(file_handle_t handle, in WriteZeroChunk() argument
155 return storage_write(handle, off, data_buf, sizeof(data_buf), opflags); in WriteZeroChunk()
158 static int WritePatternChunk(file_handle_t handle, in WritePatternChunk() argument
169 return storage_write(handle, off, data_buf, sizeof(data_buf), opflags); in WritePatternChunk()
172 static int WritePatternExt(file_handle_t handle, in WritePatternExt() argument
185 int rc = WritePatternChunk(handle, off, chunk_len, in WritePatternExt()
198 static int WritePattern(file_handle_t handle, in WritePattern() argument
203 return WritePatternExt(handle, off, data_len, chunk_len, in WritePattern()
207 static int ReadChunk(file_handle_t handle, in ReadChunk() argument
221 rc = storage_read(handle, off, data_buf, chunk_len); in ReadChunk()
[all …]
/trusty/user/base/include/user/
Dtrusty_ipc.h114 handle_t handle; /* handle this event is related too */ member
127 handle_t accept(handle_t handle, uuid_t* peer_uuid);
128 int close(handle_t handle);
129 int set_cookie(handle_t handle, void* cookie);
131 int handle_set_ctrl(handle_t handle, uint32_t cmd, struct uevent* evt);
132 int wait(handle_t handle, uevent_t* event, uint32_t timeout_msecs);
134 int get_msg(handle_t handle, ipc_msg_info_t* msg_info);
135 ssize_t read_msg(handle_t handle,
139 int put_msg(handle_t handle, uint32_t msg_id);
140 ssize_t send_msg(handle_t handle, ipc_msg_t* msg);
[all …]
/trusty/kernel/lib/trusty/include/
Dsyscall_table.h40 DEF_SYSCALL(0x8, mmap, long, 4, void *uaddr, uint32_t size, uint32_t flags, int32_t handle)
45 DEF_SYSCALL(0xd, dup, long, 1, int32_t handle)
50 DEF_SYSCALL(0x12, accept, long, 2, int32_t handle, struct uuid *peer_uuid)
51 DEF_SYSCALL(0x13, close, long, 1, int32_t handle)
52 DEF_SYSCALL(0x14, set_cookie, long, 2, int32_t handle, void *cookie)
54 DEF_SYSCALL(0x16, handle_set_ctrl, long, 3, int32_t handle, uint32_t cmd, struct uevent *evt)
57 DEF_SYSCALL(0x18, wait, long, 3, int32_t handle, struct uevent *event, uint32_t timeout_msecs)
61 DEF_SYSCALL(0x20, get_msg, long, 2, int32_t handle, struct ipc_msg_info *msg_info)
62 DEF_SYSCALL(0x21, read_msg, long, 4, int32_t handle, uint32_t msg_id, uint32_t offset, struct ipc_m…
63 DEF_SYSCALL(0x22, put_msg, long, 2, int32_t handle, uint32_t msg_id)
[all …]
/trusty/user/base/app/apploader/tests/
Dapploader_test.c107 handle_t handle; in load_test_app() local
108 handle = memref_create(app_start, aligned_app_size, MMAP_FLAG_PROT_READ); in load_test_app()
109 ASSERT_GT(handle, 0); in load_test_app()
115 sizeof(req), handle, NULL, 0); in load_test_app()
118 if (handle > 0) { in load_test_app()
119 close(handle); in load_test_app()
157 handle_t handle; in get_memory_handle_from_service() local
162 sizeof(req), INVALID_IPC_HANDLE, &handle, 1); in get_memory_handle_from_service()
165 ASSERT_NE(handle, INVALID_IPC_HANDLE); in get_memory_handle_from_service()
167 return handle; in get_memory_handle_from_service()
[all …]
/trusty/kernel/lib/unittest/
Dunittest.c49 static struct handle* ipc_printf_handle;
51 static struct handle* unittest_handle_set;
58 static int send_msg_wait(struct handle* handle, struct ipc_msg_kern* msg) { in send_msg_wait() argument
64 ret = ipc_send_msg(handle, msg); in send_msg_wait()
69 ret = handle_wait(handle, &event, INFINITE_TIME); in send_msg_wait()
75 return ipc_send_msg(handle, msg); in send_msg_wait()
148 struct handle* chandle; in unittest_loop()
162 evt.handle, test->port_name); in unittest_loop()
165 ret = ipc_port_accept(evt.handle, &chandle, &unused_uuid_p); in unittest_loop()
203 struct handle* phandle; in unittest_add_locked()
[all …]
/trusty/user/base/lib/tipc/
Dtipc_srv.c44 handle_t handle; member
51 handle_t handle; member
74 (void)tipc_hset_mod_entry(srv->hset, p->handle, mask, in set_ports_event_mask()
92 rc = tipc_hset_remove_entry(srv->hset, chan->handle); in tipc_chan_close()
117 close(chan->handle); in tipc_chan_close()
136 assert(ev->handle == chan->handle); in chan_event_handler_proc()
143 rc = srv->ops->on_message(chan->port->cfg, chan->handle, in chan_event_handler_proc()
148 ev->handle); in chan_event_handler_proc()
160 srv->ops->on_disconnect(chan->port->cfg, chan->handle, in chan_event_handler_proc()
170 rc = srv->ops->on_send_unblocked(chan->port->cfg, chan->handle, in chan_event_handler_proc()
[all …]
Dtipc.c170 TLOGE("error event (0x%x) for port (%d)\n", ev->event, ev->handle); in tipc_handle_port_errors()
182 TLOGE("error event (0x%x) for chan (%d)\n", ev->event, ev->handle); in tipc_handle_chan_errors()
195 hset->handle = INVALID_IPC_HANDLE; in tipc_hset_init()
201 hset->handle = (handle_t)rc; in tipc_hset_init()
228 handle_t handle, in tipc_hset_add_entry() argument
232 .handle = handle, in tipc_hset_add_entry()
243 return handle_set_ctrl(hset->handle, HSET_ADD, &uevt); in tipc_hset_add_entry()
250 handle_t handle, in tipc_hset_mod_entry() argument
254 .handle = handle, in tipc_hset_mod_entry()
265 return handle_set_ctrl(hset->handle, HSET_MOD, &uevt); in tipc_hset_mod_entry()
[all …]
/trusty/user/app/storage/
Dtipc_ns.h30 void ns_close_file(handle_t ipc_handle, ns_handle_t handle);
32 ns_handle_t handle,
35 ns_handle_t handle,
40 ns_handle_t handle,
/trusty/user/base/interface/storage/include/interface/storage/
Dstorage.h270 uint32_t handle; member
290 uint32_t handle; member
298 uint32_t handle; member
307 uint32_t handle; member
326 uint32_t handle; member
354 uint32_t handle; member
392 uint32_t handle; member
410 uint32_t handle; member
/trusty/user/app/sample/secure_fb_mock_impl/
Dmain.cpp47 handle_t handle = INVALID_IPC_HANDLE; member
55 if (fb_db_[0].handle != INVALID_IPC_HANDLE) { in ~SecureFbMockImpl()
56 close(fb_db_[0].handle); in ~SecureFbMockImpl()
87 buf_info.handle, 0); in Init()
97 int handle = in Init() local
99 if (handle < 0) { in Init()
100 TLOGE("Failed to create memref (%d)\n", handle); in Init()
115 .handle = handle, in Init()
131 .handles[0] = fb_db_[0].handle, in GetFbs()
/trusty/user/base/lib/storage/include/lib/storage/
Dstorage.h105 void storage_close_file(file_handle_t handle);
128 file_handle_t handle,
197 ssize_t storage_read(file_handle_t handle,
214 ssize_t storage_write(file_handle_t handle,
228 int storage_set_file_size(file_handle_t handle,
239 int storage_get_file_size(file_handle_t handle, storage_off_t* size);

12345