Home
last modified time | relevance | path

Searched refs:dbase (Results 1 – 25 of 48) sorted by relevance

12

/external/selinux/libsemanage/src/
Ddatabase_llist.c16 int dbase_llist_needs_resync(semanage_handle_t * handle, dbase_llist_t * dbase) in dbase_llist_needs_resync() argument
21 if (dbase->cache_serial < 0) in dbase_llist_needs_resync()
28 if (cache_serial != dbase->cache_serial) { in dbase_llist_needs_resync()
29 dbase_llist_drop_cache(dbase); in dbase_llist_needs_resync()
30 dbase->cache_serial = -1; in dbase_llist_needs_resync()
38 dbase_llist_t * dbase, const record_t * data) in dbase_llist_cache_prepend() argument
46 if (dbase->rtable->clone(handle, data, &entry->data) < 0) in dbase_llist_cache_prepend()
50 entry->next = dbase->cache; in dbase_llist_cache_prepend()
53 if (dbase->cache != NULL) in dbase_llist_cache_prepend()
54 dbase->cache->prev = entry; in dbase_llist_cache_prepend()
[all …]
Ddatabase_policydb.c44 static void dbase_policydb_drop_cache(dbase_policydb_t * dbase) in dbase_policydb_drop_cache() argument
47 if (dbase->cache_serial >= 0) { in dbase_policydb_drop_cache()
48 sepol_policydb_free(dbase->policydb); in dbase_policydb_drop_cache()
49 dbase->cache_serial = -1; in dbase_policydb_drop_cache()
50 dbase->modified = 0; in dbase_policydb_drop_cache()
55 dbase_policydb_t * dbase) in dbase_policydb_set_serial() argument
64 dbase->cache_serial = cache_serial; in dbase_policydb_set_serial()
69 dbase_policydb_t * dbase) in dbase_policydb_needs_resync() argument
74 if (dbase->cache_serial < 0) in dbase_policydb_needs_resync()
81 if (cache_serial != dbase->cache_serial) { in dbase_policydb_needs_resync()
[all …]
Ddatabase_llist.h34 static inline void dbase_llist_cache_init(dbase_llist_t * dbase) in dbase_llist_cache_init() argument
37 dbase->cache = NULL; in dbase_llist_cache_init()
38 dbase->cache_tail = NULL; in dbase_llist_cache_init()
39 dbase->cache_sz = 0; in dbase_llist_cache_init()
40 dbase->cache_serial = -1; in dbase_llist_cache_init()
41 dbase->modified = 0; in dbase_llist_cache_init()
44 static inline void dbase_llist_init(dbase_llist_t * dbase, in dbase_llist_init() argument
49 dbase->rtable = rtable; in dbase_llist_init()
50 dbase->dtable = dtable; in dbase_llist_init()
51 dbase_llist_cache_init(dbase); in dbase_llist_init()
[all …]
Dhandle.h117 dbase_config_t dbase[DBASE_COUNT]; member
124 return &handle->dbase[DBASE_LOCAL_USERS_BASE]; in semanage_user_base_dbase_local()
130 return &handle->dbase[DBASE_LOCAL_USERS_EXTRA]; in semanage_user_extra_dbase_local()
136 return &handle->dbase[DBASE_LOCAL_USERS]; in semanage_user_dbase_local()
142 return &handle->dbase[DBASE_LOCAL_PORTS]; in semanage_port_dbase_local()
148 return &handle->dbase[DBASE_LOCAL_IBPKEYS]; in semanage_ibpkey_dbase_local()
154 return &handle->dbase[DBASE_LOCAL_IBENDPORTS]; in semanage_ibendport_dbase_local()
160 return &handle->dbase[DBASE_LOCAL_INTERFACES]; in semanage_iface_dbase_local()
166 return &handle->dbase[DBASE_LOCAL_BOOLEANS]; in semanage_bool_dbase_local()
172 return &handle->dbase[DBASE_LOCAL_FCONTEXTS]; in semanage_fcontext_dbase_local()
[all …]
Ddatabase_join.c37 static int dbase_join_cache(semanage_handle_t * handle, dbase_join_t * dbase) in dbase_join_cache() argument
41 dbase_t *dbase1 = dbase->join1->dbase; in dbase_join_cache()
42 dbase_t *dbase2 = dbase->join2->dbase; in dbase_join_cache()
43 dbase_table_t *dtable1 = dbase->join1->dtable; in dbase_join_cache()
44 dbase_table_t *dtable2 = dbase->join2->dtable; in dbase_join_cache()
45 record_table_t *rtable = dbase_llist_get_rtable(&dbase->llist); in dbase_join_cache()
46 record_join_table_t *rjtable = dbase->rjtable; in dbase_join_cache()
57 if (!dbase_llist_needs_resync(handle, &dbase->llist)) in dbase_join_cache()
61 dbase_llist_cache_init(&dbase->llist); in dbase_join_cache()
62 if (dbase_llist_set_serial(handle, &dbase->llist) < 0) in dbase_join_cache()
[all …]
Ddatabase_activedb.c33 dbase_activedb_t * dbase) in dbase_activedb_cache() argument
36 record_table_t *rtable = dbase_llist_get_rtable(&dbase->llist); in dbase_activedb_cache()
37 record_activedb_table_t *ratable = dbase->ratable; in dbase_activedb_cache()
44 if (!dbase_llist_needs_resync(handle, &dbase->llist)) in dbase_activedb_cache()
48 dbase_llist_cache_init(&dbase->llist); in dbase_activedb_cache()
49 if (dbase_llist_set_serial(handle, &dbase->llist) < 0) in dbase_activedb_cache()
58 if (dbase_llist_cache_prepend(handle, &dbase->llist, records[i]) in dbase_activedb_cache()
71 dbase_llist_drop_cache(&dbase->llist); in dbase_activedb_cache()
77 dbase_activedb_t * dbase) in dbase_activedb_flush() argument
80 record_table_t *rtable = dbase_llist_get_rtable(&dbase->llist); in dbase_activedb_flush()
[all …]
Ddatabase_file.c40 static int dbase_file_cache(semanage_handle_t * handle, dbase_file_t * dbase) in dbase_file_cache() argument
43 record_table_t *rtable = dbase_llist_get_rtable(&dbase->llist); in dbase_file_cache()
44 record_file_table_t *rftable = dbase->rftable; in dbase_file_cache()
53 if (!dbase_llist_needs_resync(handle, &dbase->llist)) in dbase_file_cache()
57 dbase_llist_cache_init(&dbase->llist); in dbase_file_cache()
58 if (dbase_llist_set_serial(handle, &dbase->llist) < 0) in dbase_file_cache()
61 fname = dbase->path[handle->is_in_transaction]; in dbase_file_cache()
88 if (dbase_llist_cache_prepend(handle, &dbase->llist, in dbase_file_cache()
109 dbase_llist_drop_cache(&dbase->llist); in dbase_file_cache()
114 static int dbase_file_flush(semanage_handle_t * handle, dbase_file_t * dbase) in dbase_file_flush() argument
[all …]
Ddatabase.h69 dbase_t * dbase,
77 dbase_t * dbase,
84 dbase_t * dbase,
89 dbase_t * dbase, const record_key_t * key);
94 int (*clear) (struct semanage_handle * handle, dbase_t * dbase);
103 dbase_t * dbase,
108 dbase_t * dbase,
113 dbase_t * dbase, unsigned int *response);
132 dbase_t * dbase,
142 dbase_t * dbase,
[all …]
Dpolicy_components.c26 record_table_t *rtable = src_dtable->get_rtable(src->dbase); in clear_obsolete()
34 if (dst_dtable->exists(handle, dst->dbase, key, &exists) < 0) in clear_obsolete()
38 if (src_dtable->del(handle, src->dbase, key) < 0) in clear_obsolete()
67 dbase_t *dbase = dst->dbase; in load_records() local
69 record_table_t *rtable = dtable->get_rtable(dbase); in load_records()
81 dtable->set(handle, dbase, rkey, records[i]) < 0) in load_records()
85 dtable->modify(handle, dbase, rkey, records[i]) < 0) in load_records()
157 record_table_t *rtable = src->dtable->get_rtable(src->dbase); in semanage_base_merge_components()
160 if (src->dtable->cache(handle, src->dbase) < 0) in semanage_base_merge_components()
162 if (dst->dtable->cache(handle, dst->dbase) < 0) in semanage_base_merge_components()
[all …]
Ddatabase.c39 if (dconfig->dtable->cache(handle, dconfig->dbase) < 0) in enter_ro()
72 if (dconfig->dtable->cache(handle, dconfig->dbase) < 0) in enter_rw()
90 if (dconfig->dtable->modify(handle, dconfig->dbase, key, data) < 0) in dbase_modify()
104 if (dconfig->dtable->set(handle, dconfig->dbase, key, data) < 0) in dbase_set()
117 if (dconfig->dtable->del(handle, dconfig->dbase, key) < 0) in dbase_del()
131 if (dconfig->dtable->query(handle, dconfig->dbase, key, response) < 0) { in dbase_query()
147 if (dconfig->dtable->exists(handle, dconfig->dbase, key, response) < 0) { in dbase_exists()
162 if (dconfig->dtable->count(handle, dconfig->dbase, response) < 0) { in dbase_count()
179 if (dconfig->dtable->iterate(handle, dconfig->dbase, fn, fn_arg) < 0) { in dbase_iterate()
195 if (dconfig->dtable->list(handle, dconfig->dbase, records, count) < 0) { in dbase_list()
Ddatabase_policydb.h93 dbase_policydb_t ** dbase);
99 extern void dbase_policydb_attach(dbase_policydb_t * dbase,
104 extern void dbase_policydb_detach(dbase_policydb_t * dbase);
107 extern void dbase_policydb_release(dbase_policydb_t * dbase);
Ddirect_api.c702 pusers_extra->dtable->drop_cache(pusers_extra->dbase); in semanage_direct_update_user_extra()
705 retval = pusers_extra->dtable->clear(sh, pusers_extra->dbase); in semanage_direct_update_user_extra()
757 pseusers->dtable->drop_cache(pseusers->dbase); in semanage_direct_update_seuser()
759 retval = pseusers->dtable->clear(sh, pseusers->dbase); in semanage_direct_update_seuser()
1240 ports_modified = ports->dtable->is_modified(ports->dbase); in semanage_direct_commit()
1241 ibpkeys_modified = ibpkeys->dtable->is_modified(ibpkeys->dbase); in semanage_direct_commit()
1242 ibendports_modified = ibendports->dtable->is_modified(ibendports->dbase); in semanage_direct_commit()
1243 seusers_modified = seusers->dtable->is_modified(seusers->dbase); in semanage_direct_commit()
1244 fcontexts_modified = fcontexts->dtable->is_modified(fcontexts->dbase); in semanage_direct_commit()
1314 if (users->dtable->is_modified(users->dbase)) { in semanage_direct_commit()
[all …]
Ddatabase_activedb.h29 dbase_activedb_t ** dbase);
32 extern void dbase_activedb_release(dbase_activedb_t * dbase);
Ddatabase_file.h35 dbase_file_t ** dbase);
38 extern void dbase_file_release(dbase_file_t * dbase);
Ddatabase_join.h39 dbase_config_t * join2, dbase_join_t ** dbase);
42 extern void dbase_join_release(dbase_join_t * dbase);
Dusers_join.c38 join1, join2, &dconfig->dbase) < 0) in user_join_dbase_init()
48 dbase_join_release(dconfig->dbase); in user_join_dbase_release()
Dbooleans_policydb.c62 &dconfig->dbase) < 0) in bool_policydb_dbase_init()
72 dbase_policydb_release(dconfig->dbase); in bool_policydb_dbase_release()
Dusers_base_policydb.c57 &dconfig->dbase) < 0) in user_base_policydb_dbase_init()
67 dbase_policydb_release(dconfig->dbase); in user_base_policydb_dbase_release()
Dports_policydb.c57 &dconfig->dbase) < 0) in port_policydb_dbase_init()
68 dbase_policydb_release(dconfig->dbase); in port_policydb_dbase_release()
Dibendports_policydb.c51 &dconfig->dbase) < 0) in ibendport_policydb_dbase_init()
61 dbase_policydb_release(dconfig->dbase); in ibendport_policydb_dbase_release()
Dibpkeys_policydb.c51 &dconfig->dbase) < 0) in ibpkey_policydb_dbase_init()
61 dbase_policydb_release(dconfig->dbase); in ibpkey_policydb_dbase_release()
Dinterfaces_policydb.c58 &dconfig->dbase) < 0) in iface_policydb_dbase_init()
68 dbase_policydb_release(dconfig->dbase); in iface_policydb_dbase_release()
Dnodes_policydb.c57 &dconfig->dbase) < 0) in node_policydb_dbase_init()
68 dbase_policydb_release(dconfig->dbase); in node_policydb_dbase_release()
/external/tensorflow/tensorflow/core/framework/
Ddevice_base_test.cc30 DeviceBase dbase(Env::Default()); in TEST() local
34 ASSERT_FALSE(dbase.has_eigen_cpu_device()); in TEST()
35 dbase.set_eigen_cpu_device(&eigen_device); in TEST()
36 ASSERT_TRUE(dbase.has_eigen_cpu_device()); in TEST()
39 auto d = dbase.eigen_cpu_device(); in TEST()
45 auto d = dbase.eigen_cpu_device(); in TEST()
51 auto d = dbase.eigen_cpu_device(); in TEST()
57 auto d = dbase.eigen_cpu_device(); in TEST()
/external/iproute2/misc/
Darpd.c41 DB *dbase; variable
305 dbase->sync(dbase, 0); in do_one_request()
338 if (dbase->get(dbase, &dbkey, &dbdat, 0) != 0) { in do_one_request()
362 dbase->del(dbase, &dbkey, 0); in do_one_request()
388 dbase->put(dbase, &dbkey, &dbdat, 0); in do_one_request()
407 dbase->put(dbase, &dbkey, &dbdat, 0); in do_one_request()
419 dbase->put(dbase, &dbkey, &dbdat, 0); in do_one_request()
520 if (dbase->get(dbase, &dbkey, &dbdat, 0) == 0 && !IS_NEG(dbdat.data)) { in get_arp_pkt()
530 dbase->put(dbase, &dbkey, &dbdat, 0); in get_arp_pkt()
675 dbase = dbopen(dbname, O_CREAT|O_RDWR, 0644, DB_HASH, NULL); in main()
[all …]

12