Home
last modified time | relevance | path

Searched refs:ctx (Results 1 – 25 of 140) sorted by relevance

123456

/system/extras/verity/fec/
Dimage.cpp46 void image_init(image *ctx) in image_init() argument
48 memset(ctx, 0, sizeof(*ctx)); in image_init()
51 void image_free(image *ctx) in image_free() argument
53 assert(ctx->input == ctx->output); in image_free()
55 if (ctx->input) { in image_free()
56 delete[] ctx->input; in image_free()
59 if (ctx->fec) { in image_free()
60 delete[] ctx->fec; in image_free()
63 image_init(ctx); in image_free()
66 static void calculate_rounds(uint64_t size, image *ctx) in calculate_rounds() argument
[all …]
Dmain.cpp42 static void encode_rs(struct image_proc_ctx *ctx) in encode_rs() argument
44 struct image *fcx = ctx->ctx; in encode_rs()
49 for (i = ctx->start; i < ctx->end; i += fcx->rs_n) { in encode_rs()
54 encode_rs_char(ctx->rs, data, &fcx->fec[ctx->fec_pos]); in encode_rs()
55 ctx->fec_pos += fcx->roots; in encode_rs()
59 static void decode_rs(struct image_proc_ctx *ctx) in decode_rs() argument
61 struct image *fcx = ctx->ctx; in decode_rs()
68 for (i = ctx->start; i < ctx->end; i += fcx->rs_n) { in decode_rs()
73 memcpy(&data[fcx->rs_n], &fcx->fec[ctx->fec_pos], fcx->roots); in decode_rs()
74 rv = decode_rs_char(ctx->rs, data, nullptr, 0); in decode_rs()
[all …]
Dimage.h72 image *ctx; member
80 extern bool image_load(const std::vector<std::string>& filename, image *ctx);
81 extern bool image_save(const std::string& filename, image *ctx);
83 extern bool image_ecc_new(const std::string& filename, image *ctx);
84 extern bool image_ecc_load(const std::string& filename, image *ctx);
85 extern bool image_ecc_save(image *ctx);
87 extern bool image_process(image_proc_func f, image *ctx);
89 extern void image_init(image *ctx);
90 extern void image_free(image *ctx);
92 inline uint8_t image_get_interleaved_byte(uint64_t i, image *ctx) in image_get_interleaved_byte() argument
[all …]
/system/core/liblog/include/log/
Dlog_event_list.h68 int android_log_write_list_begin(android_log_context ctx);
69 int android_log_write_list_end(android_log_context ctx);
71 int android_log_write_int32(android_log_context ctx, int32_t value);
72 int android_log_write_int64(android_log_context ctx, int64_t value);
73 int android_log_write_string8(android_log_context ctx, const char* value);
74 int android_log_write_string8_len(android_log_context ctx, const char* value,
76 int android_log_write_float32(android_log_context ctx, float value);
80 int android_log_write_list(android_log_context ctx, log_id_t id);
87 android_log_list_element android_log_read_next(android_log_context ctx);
88 android_log_list_element android_log_peek_next(android_log_context ctx);
[all …]
/system/sepolicy/build/soong/
Dselinux_contexts.go77 build func(ctx android.ModuleContext, inputs android.Paths) android.Path
78 deps func(ctx android.BottomUpMutatorContext)
96 android.PreDepsMutators(func(ctx android.RegisterMutatorsContext) {
97 ctx.BottomUp("selinux_contexts", selinuxContextsMutator).Parallel()
117 func (m *selinuxContextsModule) DepsMutator(ctx android.BottomUpMutatorContext) {
119 m.deps(ctx)
123 func (m *selinuxContextsModule) propertyContextsDeps(ctx android.BottomUpMutatorContext) {
124 for _, lib := range sysprop.SyspropLibraries(ctx.Config()) {
125 ctx.AddFarVariationDependencies([]blueprint.Variation{}, syspropLibraryDepTag, lib)
129 func (m *selinuxContextsModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
[all …]
Dfilegroup.go112 func (fg *fileGroup) findSrcsInDirs(ctx android.ModuleContext, dirs []string) android.Paths {
117 files, _ := ctx.GlobWithDeps(path, nil)
119 result = append(result, android.PathForSource(ctx, f))
126 func (fg *fileGroup) findSrcsInDir(ctx android.ModuleContext, dir string) android.Paths {
127 return fg.findSrcsInDirs(ctx, []string{dir})
130 func (fg *fileGroup) DepsMutator(ctx android.BottomUpMutatorContext) {}
132 func (fg *fileGroup) GenerateAndroidBuildActions(ctx android.ModuleContext) {
133 fg.systemPublicSrcs = fg.findSrcsInDir(ctx, filepath.Join(ctx.ModuleDir(), "public"))
134 fg.systemPrivateSrcs = fg.findSrcsInDir(ctx, filepath.Join(ctx.ModuleDir(), "private"))
135 fg.systemVendorSrcs = fg.findSrcsInDir(ctx, filepath.Join(ctx.ModuleDir(), "vendor"))
[all …]
Dcil_compat_map.go84 func expandTopHalf(ctx android.ModuleContext) android.OptionalPath {
86 ctx.VisitDirectDeps(func(dep android.Module) {
87 depTag := ctx.OtherModuleDependencyTag(dep)
96 func expandSeSources(ctx android.ModuleContext, srcFiles []string) android.Paths {
100 module := ctx.GetDirectDepWithTag(m, android.SourceDepTag)
106 if ctx.ProductSpecific() {
108 } else if ctx.SystemExtSpecific() {
114 ctx.ModuleErrorf("srcs dependency %q is not an selinux filegroup", m)
117 p := android.PathForModuleSrc(ctx, s)
124 func (c *cilCompatMap) GenerateAndroidBuildActions(ctx android.ModuleContext) {
[all …]
/system/core/liblog/include_vndk/log/
Dlog_event_list.h50 int android_log_write_list_begin(android_log_context ctx);
51 int android_log_write_list_end(android_log_context ctx);
53 int android_log_write_int32(android_log_context ctx, int32_t value);
54 int android_log_write_int64(android_log_context ctx, int64_t value);
55 int android_log_write_string8(android_log_context ctx, const char* value);
56 int android_log_write_string8_len(android_log_context ctx, const char* value,
58 int android_log_write_float32(android_log_context ctx, float value);
62 int android_log_write_list(android_log_context ctx, log_id_t id);
65 int android_log_reset(android_log_context ctx);
68 int android_log_parser_reset(android_log_context ctx,
[all …]
/system/core/libstats/push_compat/include/
Dstats_event_list.h25 void reset_log_context(android_log_context ctx);
29 int android_log_write_char_array(android_log_context ctx, const char* value, size_t len);
46 android_log_context ctx;
54 ctx = create_android_logger(static_cast<uint32_t>(tag)); in stats_event_list()
56 ~stats_event_list() { android_log_destroy(&ctx); } in ~stats_event_list()
59 int retval = android_log_destroy(&ctx); in close()
67 operator android_log_context() const { return ctx; } in android_log_context()
73 int retval = android_log_write_list_begin(ctx); in begin()
80 int retval = android_log_write_list_end(ctx); in end()
88 int retval = android_log_write_int32(ctx, value);
[all …]
/system/core/libstats/socket/include/
Dstats_event_list.h25 void reset_log_context(android_log_context ctx);
29 int android_log_write_char_array(android_log_context ctx, const char* value, size_t len);
44 android_log_context ctx;
52 ctx = create_android_logger(static_cast<uint32_t>(tag)); in stats_event_list()
54 ~stats_event_list() { android_log_destroy(&ctx); } in ~stats_event_list()
57 int retval = android_log_destroy(&ctx); in close()
65 operator android_log_context() const { return ctx; } in android_log_context()
71 int retval = android_log_write_list_begin(ctx); in begin()
78 int retval = android_log_write_list_end(ctx); in end()
86 int retval = android_log_write_int32(ctx, value);
[all …]
/system/linkerconfig/contents/namespace/
Dsphal.cc34 Namespace BuildSphalNamespace([[maybe_unused]] const Context& ctx) { in BuildSphalNamespace() argument
38 /*is_isolated=*/!ctx.IsUnrestrictedSection(), in BuildSphalNamespace()
48 if (ctx.IsApexBinaryConfig() && !ctx.IsVndkAvailable()) { in BuildSphalNamespace()
55 if (ctx.IsApexBinaryConfig()) { in BuildSphalNamespace()
56 if (ctx.IsVndkAvailable()) { in BuildSphalNamespace()
59 ns.GetLink(ctx.GetSystemNamespaceName()) in BuildSphalNamespace()
67 if (ctx.IsSystemSection() || ctx.IsUnrestrictedSection()) { in BuildSphalNamespace()
70 ns.GetLink(ctx.GetSystemNamespaceName()) in BuildSphalNamespace()
/system/keymaster/key_blob_utils/
Docb.c386 #define ROUNDS(ctx) ((ctx)->rounds) argument
399 #define ROUNDS(ctx) (6 + OCB_KEY_LEN / 4) argument
433 #define ROUNDS(ctx) ((ctx)->rounds) argument
436 #define ROUNDS(ctx) (6 + OCB_KEY_LEN / 4) argument
656 static block getL(const ae_ctx* ctx, unsigned tz) { in getL() argument
658 return ctx->L[tz]; in getL()
662 block rval = swap_if_le(ctx->L[L_TABLE_SZ - 1]); in getL()
694 void ae_free(ae_ctx* ctx) { in ae_free() argument
696 _mm_free(ctx); in ae_free()
698 free(ctx); in ae_free()
[all …]
/system/linkerconfig/contents/section/
Dsystem.cc31 Section BuildSystemSection(Context& ctx) { in BuildSystemSection() argument
32 ctx.SetCurrentSection(SectionType::System); in BuildSystemSection()
35 namespaces.emplace_back(BuildSystemDefaultNamespace(ctx)); in BuildSystemSection()
36 if (ctx.IsVndkAvailable()) { in BuildSystemSection()
37 namespaces.emplace_back(BuildSphalNamespace(ctx)); in BuildSystemSection()
38 namespaces.emplace_back(BuildRsNamespace(ctx)); in BuildSystemSection()
39 namespaces.emplace_back(BuildVndkNamespace(ctx, VndkUserPartition::Vendor)); in BuildSystemSection()
42 BuildVndkNamespace(ctx, VndkUserPartition::Product)); in BuildSystemSection()
57 for (const auto& apex : ctx.GetApexModules()) { in BuildSystemSection()
63 return BuildSection(ctx, "system", std::move(namespaces), visible_apexes); in BuildSystemSection()
Dapexdefault.cc45 Section BuildApexDefaultSection(Context& ctx, const ApexInfo& apex_info) { in BuildApexDefaultSection() argument
48 ctx.SetCurrentSection(SectionType::Other); in BuildApexDefaultSection()
50 namespaces.emplace_back(BuildApexDefaultNamespace(ctx, apex_info)); in BuildApexDefaultSection()
51 namespaces.emplace_back(BuildApexPlatformNamespace(ctx)); in BuildApexDefaultSection()
56 namespaces.emplace_back(BuildSphalNamespace(ctx)); in BuildApexDefaultSection()
57 if (ctx.IsVndkAvailable()) { in BuildApexDefaultSection()
59 BuildVndkNamespace(ctx, VndkUserPartition::Vendor)); in BuildApexDefaultSection()
65 if (ctx.IsVndkAvailable()) { in BuildApexDefaultSection()
69 std::bind(BuildVndkNamespace, ctx, VndkUserPartition::Vendor), in BuildApexDefaultSection()
75 ctx, apex_info.name, std::move(namespaces), {}, libs_providers); in BuildApexDefaultSection()
Dunrestricted.cc36 Section BuildUnrestrictedSection(Context& ctx) { in BuildUnrestrictedSection() argument
37 ctx.SetCurrentSection(SectionType::Unrestricted); in BuildUnrestrictedSection()
40 namespaces.emplace_back(BuildUnrestrictedDefaultNamespace(ctx)); in BuildUnrestrictedSection()
41 if (ctx.IsVndkAvailable()) { in BuildUnrestrictedSection()
42 namespaces.emplace_back(BuildSphalNamespace(ctx)); in BuildUnrestrictedSection()
43 namespaces.emplace_back(BuildVndkNamespace(ctx, VndkUserPartition::Vendor)); in BuildUnrestrictedSection()
44 namespaces.emplace_back(BuildRsNamespace(ctx)); in BuildUnrestrictedSection()
58 for (const auto& apex : ctx.GetApexModules()) { in BuildUnrestrictedSection()
65 ctx, "unrestricted", std::move(namespaces), visible_apexes); in BuildUnrestrictedSection()
Dvendor.cc33 Section BuildVendorSection(Context& ctx) { in BuildVendorSection() argument
34 ctx.SetCurrentSection(SectionType::Vendor); in BuildVendorSection()
37 namespaces.emplace_back(BuildVendorDefaultNamespace(ctx)); in BuildVendorSection()
38 namespaces.emplace_back(BuildVndkNamespace(ctx, VndkUserPartition::Vendor)); in BuildVendorSection()
39 namespaces.emplace_back(BuildSystemNamespace(ctx)); in BuildVendorSection()
42 namespaces.emplace_back(BuildVndkInSystemNamespace(ctx)); in BuildVendorSection()
45 return BuildSection(ctx, in BuildVendorSection()
Dproduct.cc33 Section BuildProductSection(Context& ctx) { in BuildProductSection() argument
34 ctx.SetCurrentSection(SectionType::Product); in BuildProductSection()
37 namespaces.emplace_back(BuildProductDefaultNamespace(ctx)); in BuildProductSection()
38 namespaces.emplace_back(BuildVndkNamespace(ctx, VndkUserPartition::Product)); in BuildProductSection()
39 namespaces.emplace_back(BuildSystemNamespace(ctx)); in BuildProductSection()
42 namespaces.emplace_back(BuildVndkInSystemNamespace(ctx)); in BuildProductSection()
45 return BuildSection(ctx, in BuildProductSection()
/system/tools/aidl/build/
Daidl_test.go134 ctx := android.NewTestArchContext()
135 cc.RegisterRequiredBuildComponentsForTest(ctx)
136 ctx.RegisterModuleType("aidl_interface", aidlInterfaceFactory)
137 ctx.RegisterModuleType("aidl_interfaces_metadata", aidlInterfacesMetadataSingletonFactory)
138 ctx.RegisterModuleType("android_app", java.AndroidAppFactory)
139 ctx.RegisterModuleType("java_defaults", func() android.Module {
142 ctx.RegisterModuleType("java_library_static", java.LibraryStaticFactory)
143 ctx.RegisterModuleType("java_library", java.LibraryFactory)
144 ctx.RegisterModuleType("java_system_modules", java.SystemModulesFactory)
146 ctx.PreArchMutators(android.RegisterDefaultsPreArchMutators)
[all …]
/system/core/liblog/
Dlog_event_write.cpp30 android_log_context ctx = create_android_logger(tag); in __android_log_error_write() local
33 if (ctx) { in __android_log_error_write()
34 ret = android_log_write_string8_len(ctx, subTag, MAX_SUBTAG_LEN); in __android_log_error_write()
36 ret = android_log_write_int32(ctx, uid); in __android_log_error_write()
38 ret = android_log_write_string8_len(ctx, data, dataLen); in __android_log_error_write()
40 ret = android_log_write_list(ctx, LOG_ID_EVENTS); in __android_log_error_write()
44 android_log_destroy(&ctx); in __android_log_error_write()
/system/tools/hidl/build/
Dhidl_package_root.go72 func (r *hidlPackageRoot) generateCurrentFile(ctx android.ModuleContext) {
77 output := android.PathForModuleGen(ctx, r.Name()+".txt")
80 ctx.ModuleBuild(pctx, android.ModuleBuildParams{
94 func (r *hidlPackageRoot) GenerateAndroidBuildActions(ctx android.ModuleContext) {
96 r.properties.Path = proptools.StringPtr(ctx.ModuleDir())
100 if *r.properties.Path != ctx.ModuleDir() {
101 ctx.PropertyErrorf("path", "Cannot use unrelated path with use_current. "+
104 "the path of hidl_package_root.", *r.properties.Path, ctx.ModuleDir())
108 r.currentPath = android.OptionalPathForPath(android.PathForModuleSrc(ctx, "current.txt"))
110 r.currentPath = android.ExistentPathForSource(ctx, ctx.ModuleDir(), "current.txt")
[all …]
/system/linkerconfig/
Dmain.cc188 Context ctx; in GetContext() local
192 ctx.AddApexModule(std::move(apex_info)); in GetContext()
196 ctx.SetStrictMode(true); in GetContext()
198 android::linkerconfig::contents::RegisterApexNamespaceBuilders(ctx); in GetContext()
199 return ctx; in GetContext()
202 Configuration GetConfiguration(Context& ctx) { in GetConfiguration() argument
204 return android::linkerconfig::contents::CreateRecoveryConfiguration(ctx); in GetConfiguration()
208 return android::linkerconfig::contents::CreateLegacyConfiguration(ctx); in GetConfiguration()
212 return android::linkerconfig::contents::CreateBaseConfiguration(ctx); in GetConfiguration()
232 Result<void> GenerateBaseLinkerConfiguration(Context& ctx, in GenerateBaseLinkerConfiguration() argument
[all …]
/system/teeui/libteeui/example/
Dphys_button_example.cpp71 context<ConUIParameters> ctx(deviceInfo.mm2px_, deviceInfo.dp2px_); in setLayoutParams() local
72 ctx.setParam<RightEdgeOfScreen>(pxs(deviceInfo.width_)); in setLayoutParams()
73 ctx.setParam<BottomOfScreen>(pxs(deviceInfo.height_)); in setLayoutParams()
74 ctx.setParam<PowerButtonTop>(mms(deviceInfo.powerButtonTopMm_)); in setLayoutParams()
75 ctx.setParam<PowerButtonBottom>(mms(deviceInfo.powerButtonBottomMm_)); in setLayoutParams()
76 ctx.setParam<VolUpButtonTop>(mms(deviceInfo.volUpButtonTopMm_)); in setLayoutParams()
77 ctx.setParam<VolUpButtonBottom>(mms(deviceInfo.volUpButtonBottomMm_)); in setLayoutParams()
79 ctx.setParam<DefaultFontSize>(18_dp); in setLayoutParams()
80 ctx.setParam<BodyFontSize>(20_dp); in setLayoutParams()
82 ctx.setParam<DefaultFontSize>(14_dp); in setLayoutParams()
[all …]
/system/linkerconfig/contents/tests/configuration/
Dbaseconfig_test.cc29 Context ctx = GenerateContextWithVndk(); in TEST() local
30 auto base_config = CreateBaseConfiguration(ctx); in TEST()
42 Context ctx = GenerateContextWithVndk(); in TEST() local
43 auto base_config = CreateBaseConfiguration(ctx); in TEST()
54 Context ctx = GenerateContextWithVndk(); in TEST() local
55 auto base_config = CreateBaseConfiguration(ctx); in TEST()
66 Context ctx; in TEST() local
67 ctx.AddApexModule(ApexInfo("foo", "", {}, {}, {"libjni.so"}, false, true)); in TEST()
68 auto config = CreateBaseConfiguration(ctx); in TEST()
/system/core/adb/libs/adbconnection/
Dadbconnection_client.cpp61 auto ctx = std::make_unique<AdbConnectionClientContext>(); in adbconnection_client_new() local
125 ctx->control_socket_.reset(socket(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC, 0)); in adbconnection_client_new()
126 if (ctx->control_socket_ < 0) { in adbconnection_client_new()
134 setsockopt(ctx->control_socket_.get(), SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)); in adbconnection_client_new()
141 int rc = connect(ctx->control_socket_.get(), reinterpret_cast<sockaddr*>(&addr), addr_len); in adbconnection_client_new()
153 bool trusted = SocketPeerIsTrusted(ctx->control_socket_.get()); in adbconnection_client_new()
160 rc = TEMP_FAILURE_RETRY(write(ctx->control_socket_.get(), &process, sizeof(process))); in adbconnection_client_new()
165 return ctx.release(); in adbconnection_client_new()
168 void adbconnection_client_destroy(AdbConnectionClientContext* ctx) { in adbconnection_client_destroy() argument
169 delete ctx; in adbconnection_client_destroy()
[all …]
/system/ca-certificates/soong/
Dca_certificates.go26 ctx android.LoadHookContext, factory android.ModuleFactory, c *caCertificatesProperties) {
28 srcs, err := ctx.GlobWithDeps(path.Join(ctx.ModuleDir(), *c.Src_dir, "*"), nil)
30 ctx.PropertyErrorf("src_dir", "cannot find files to install")
49 ctx.CreateModule(factory, &etcProps)
59 ctx.AppendProperties(&phonyProps)
65 android.AddLoadHook(p, func(ctx android.LoadHookContext) {
66 caCertificatesLoadHook(ctx, etc.PrebuiltEtcFactory, c)
76 android.AddLoadHook(p, func(ctx android.LoadHookContext) {
77 caCertificatesLoadHook(ctx, etc.PrebuiltEtcHostFactory, c)

123456