platform/core/api/resource.git
5 days agoChange CPU_BOOSTING_FORCE_RESET_ON_CLEAR to CPU_BOOSTING_FORCE_RESET_ON_SET 19/325319/1 accepted/tizen_9.0_unified tizen_9.0 accepted/tizen/9.0/unified/20250611.103241
Unsung Lee [Wed, 4 Jun 2025 04:26:54 +0000 (13:26 +0900)]
Change CPU_BOOSTING_FORCE_RESET_ON_CLEAR to CPU_BOOSTING_FORCE_RESET_ON_SET

Change CPU_BOOSTING_FORCE_RESET_ON_CLEAR to CPU_BOOSTING_FORCE_RESET_ON_SET
to reset CPU boosting on set instead of clear.

Change-Id: I2a01d8b821c255b0ca9ac3c4f268d0380f893093
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 months agoFix enum resource_error_e to be exported 83/321583/1
Youngjae Cho [Tue, 25 Mar 2025 09:01:14 +0000 (18:01 +0900)]
Fix enum resource_error_e to be exported

The cpu-boosting.h has described its return value as a type of enum
resource_error_e, but the header hasn't included the actual definition.
Rather, the definition was at the common.h that was a header not being
exported. This caused build error where the only <cpu-boosting.h> was
included as a header for cpu boosting. To fix it, move the definition to
cpu-boosting-type.h.

/home/abuild/rpmbuild/BUILD/dbus-tools-0.1/stress-test/src/test-main.c:127:28:
   error: 'RESOURCE_ERROR_NONE' undeclared (first use in this function);
   did you mean 'G_IO_ERROR_NONE'?
  127 |                 if (ret != RESOURCE_ERROR_NONE) {
      |                            ^~~~~~~~~~~~~~~~~~~
      |                            G_IO_ERROR_NONE

Change-Id: Ibcc59281a28e03cf1a16c8f3a4f466ebb16f465a
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit 86ab6acf2720e37e7b27384b11fed3f388935575)

4 months agoAdd CPU_BOOSTING_FORCE_RESET_ON_CLEAR flag on resource_set_cpu_boosting() 02/318902/10 accepted/tizen/9.0/unified/20250210.170327
Unsung Lee [Mon, 3 Feb 2025 04:26:12 +0000 (13:26 +0900)]
Add CPU_BOOSTING_FORCE_RESET_ON_CLEAR flag on resource_set_cpu_boosting()

Add CPU_BOOSTING_FORCE_RESET_ON_CLEAR flag on resource_set_cpu_boosting() function
to reset CPU boosting forcely regardless of duplicate resource_set_cpu_boosting() on the same target.

Scenario is like below:
resource_set_cpu_boosting() with CPU_BOOSTING_FORCE_RESET_ON_CLEAR flag example:
A process: set CPU boosting on C process with CPU_BOOSTING_FORCE_RESET_ON_CLEAR flag
B process: set CPU boosting on C process
A process: clear CPU boosting on C process
In this case, CPU boosting on C process must be cleared regardless of previous CPU boosting sets.

Change-Id: Ibb104f6e492cae213d0250d746d410f6b1d2eb16
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
6 months agoDisable test build by default 45/316145/2 accepted/tizen/9.0/unified/20241212.022102
Dongsun Lee [Tue, 10 Dec 2024 07:52:05 +0000 (16:52 +0900)]
Disable test build by default

- to build the test package, use test_build_on flag as below.
  gbs build -A armv7l --define "test_build_on 1"

Change-Id: I163b6e96fe7993b2dbdda4a36aa94416ebf45c5f

6 months agoMerge branch 'tizen' into tizen_9.0
Adam Michalski [Fri, 29 Nov 2024 14:44:49 +0000 (15:44 +0100)]
Merge branch 'tizen' into tizen_9.0

Change-Id: I3134e7b08ddc8d246884d70e315fb86a91ba3873

6 months agoFix SVACE issue 55/321255/1
Adam Michalski [Fri, 29 Nov 2024 10:19:57 +0000 (11:19 +0100)]
Fix SVACE issue

WID:12134324 Result of sizeof should not be assigned to 4 byte data type

socklen_t is typically a type that represents the length of socket-related
structures. It is defined as an integer type, and its size may vary between
platforms (e.g., 4 bytes on some systems, 8 bytes on others).
The sizeof(sockaddr) expression returns a size of type size_t, which is
often 8 bytes on 64-bit platforms. Assigning a size_t value (potentially
8 bytes) to a socklen_t (potentially 4 bytes) might cause truncation,
leading to this static analyzer warning.

While this is unlikely to cause actual issues in practice (since the size of
struct sockaddr_un is typically within the range of socklen_t), the static
analyzer points out the theoretical possibility of a mismatch.

Change-Id: I1c51d47b742e7cfeaa508a4e1f1906d8b123d3f0

7 months agocpu-boosting: Remove frequent called debug log 66/319866/1 accepted/tizen/9.0/unified/20241108.065559
Unsung Lee [Tue, 5 Nov 2024 02:30:23 +0000 (11:30 +0900)]
cpu-boosting: Remove frequent called debug log

Remove frequent called but not important debug log.

Change-Id: Ia6d7f49f03240ba8eeba7b1261ad7c64e71e055f
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
7 months agocpu-boosting: Remove frequent called debug log 64/319864/1 accepted/tizen/unified/20241108.105413
Unsung Lee [Tue, 5 Nov 2024 02:30:23 +0000 (11:30 +0900)]
cpu-boosting: Remove frequent called debug log

Remove frequent called but not important debug log.

Change-Id: Ia6d7f49f03240ba8eeba7b1261ad7c64e71e055f
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
8 months agoresource-doc: Add overview of resource APIs 52/317352/7 accepted/tizen_unified_toolchain accepted/tizen/9.0/unified/20241030.235359 accepted/tizen/unified/20240924.153237 accepted/tizen/unified/toolchain/20241004.101852 accepted/tizen/unified/x/20240925.015933 accepted/tizen/unified/x/asan/20241014.000234 tizen_9.0_m2_release
Unsung Lee [Mon, 9 Sep 2024 07:49:46 +0000 (16:49 +0900)]
resource-doc: Add overview of resource APIs

Add resource API overview in the documentation to provide information
of the resource API.

Change-Id: I94084459377629badb70c7ee36ade4f7786a1c81
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
8 months agocpu-boosting: Update description of resource APIs 28/317328/8
Unsung Lee [Mon, 9 Sep 2024 04:19:24 +0000 (13:19 +0900)]
cpu-boosting: Update description of resource APIs

Update description of resource APIs in @brief, @details, @remarks, @see, and @code
to supplement the explanation.

Change-Id: I3a5c34005e19956f8107da4c79edceaa6e902ff7
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoModify headers to meet public API conditions 20/283120/1
Unsung Lee [Tue, 18 Oct 2022 07:43:35 +0000 (16:43 +0900)]
Modify headers to meet public API conditions

modify the privilege description for cpu-boosting APIs.

Change-Id: Ic4484b9ba61a26809600d08c4ebb83898669f6d5
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoChange a log from error to info 79/281379/5 accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.062953 accepted/tizen/7.0/unified/hotfix/20221116.104815 accepted/tizen/8.0/unified/20231005.092829 accepted/tizen/unified/20220927.132304 tizen_7.0_m2_release tizen_8.0_m2_release
Unsung Lee [Fri, 16 Sep 2022 07:35:46 +0000 (16:35 +0900)]
Change a log from error to info

Reduce the number of error log

Change-Id: Ib2a9b8649ec40427fac7b16efec4bf488438e7b2
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoFix bugs reported by Coverity and SVACE 19/280219/1
Unsung Lee [Thu, 25 Aug 2022 08:33:05 +0000 (17:33 +0900)]
Fix bugs reported by Coverity and SVACE

Change-Id: I716175c16073e627a52a62176b2341c2b612953e
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoAdd a service to test inheritance cases 56/280056/4
Unsung Lee [Tue, 23 Aug 2022 04:41:36 +0000 (13:41 +0900)]
Add a service to test inheritance cases

Change-Id: I918af83806f04e86c6abe71f3e179996c131b5d1
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoplugin: add (un)register and get/set inheritance 01/279501/6 accepted/tizen/unified/20220824.135631 submit/tizen/20220816.062425 submit/tizen/20220822.111221
Unsung Lee [Wed, 10 Aug 2022 09:06:52 +0000 (18:06 +0900)]
plugin: add (un)register and get/set inheritance

Change-Id: Ib1ca8bbc8eb775b0e5919c05420610dd340983b2
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoMove dlopen and dlsym to the constructor 89/279289/4 accepted/tizen/unified/20220808.135402 submit/tizen/20220805.071952
Unsung Lee [Fri, 5 Aug 2022 06:57:41 +0000 (15:57 +0900)]
Move dlopen and dlsym to the constructor

Change-Id: I33b8185e5449bd224051e009a9130097bd3662bf
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agodoc: add doc/resource_doc.h to define System > Resource category 90/278790/3
Hyotaek Shim [Tue, 26 Jul 2022 07:11:38 +0000 (16:11 +0900)]
doc: add doc/resource_doc.h to define System > Resource category

Change-Id: I9ebcb764e98e223a149210d4152ac1d2a3d8701d
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
2 years agoRename flag -> flags 98/278598/1 accepted/tizen/unified/20220726.132011 submit/tizen/20220725.093537
Unsung Lee [Fri, 22 Jul 2022 07:56:12 +0000 (16:56 +0900)]
Rename flag -> flags

Change-Id: Idab6d543d82099a0d55629db2878af54da89d458
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoModify backup/restore of original policy in resource_set_cpu_boosting API 91/278591/2
Hyotaek Shim [Fri, 22 Jul 2022 07:20:03 +0000 (16:20 +0900)]
Modify backup/restore of original policy in resource_set_cpu_boosting API

Change-Id: Iaef502fc7cc67ca3d31bfbd851da22d535d7b8a9
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
2 years agoSupplement cpu boosting test 72/278572/3
Unsung Lee [Fri, 22 Jul 2022 06:07:19 +0000 (15:07 +0900)]
Supplement cpu boosting test

Change-Id: I9e1b0fa30247e3ca341c7e99c7512253645de8b5
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoAdd flag argument on the resource_set_cpu_boosting 49/278549/3 submit/tizen/20220722.040833
Unsung Lee [Fri, 22 Jul 2022 02:26:34 +0000 (11:26 +0900)]
Add flag argument on the resource_set_cpu_boosting

Change-Id: Id0b161df3ad8910cbbf8734dc1d17a0347de35be
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoDelete non-blocking option (SOCK_NONBLOCK) 53/277953/2
Unsung Lee [Fri, 15 Jul 2022 08:06:43 +0000 (17:06 +0900)]
Delete non-blocking option (SOCK_NONBLOCK)

recv() will be delayed until timeout

Change-Id: Ia1fe772091e648abff9c34f2466ec7e370457713
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoFix bugs reported by Coverity and SVACE 33/277933/4
Unsung Lee [Fri, 15 Jul 2022 06:37:39 +0000 (15:37 +0900)]
Fix bugs reported by Coverity and SVACE

Change-Id: I27303d7286a036a15171b023e083cfda4b043eb0
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoSupport non-blocking (with timeout) socket 32/277932/2
Unsung Lee [Fri, 15 Jul 2022 05:16:43 +0000 (14:16 +0900)]
Support non-blocking (with timeout) socket

Change-Id: I6c19398d13970aabc4aa62a383aa36b473c2f852
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoSupplement cpu-boosting test code 22/277722/2
Unsung Lee [Tue, 12 Jul 2022 10:21:48 +0000 (19:21 +0900)]
Supplement cpu-boosting test code

Change-Id: Id905be00f3a9fa2f9dd6d49d2fd9f82d1e0c09c9
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoFix a SVACE reported bug 35/277635/1 accepted/tizen/unified/20220712.010808 submit/tizen/20220711.085003 submit/tizen/20220711.085050
Unsung Lee [Mon, 11 Jul 2022 08:40:29 +0000 (17:40 +0900)]
Fix a SVACE reported bug

Change-Id: I2056c0a36ba89214c13b6b864b6ed496cfe028d6
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoplugin: add clear and get funcs 29/277629/4
Unsung Lee [Mon, 11 Jul 2022 07:48:44 +0000 (16:48 +0900)]
plugin: add clear and get funcs

Change-Id: I0d6ef27e209f4dbb13fdad5153db2b962217a938
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoRearrange resource_error_e enum and add RESOURCE_ERROR_OPERATION_FAILED 14/277614/1
Hyotaek Shim [Mon, 11 Jul 2022 05:48:40 +0000 (14:48 +0900)]
Rearrange resource_error_e enum and add RESOURCE_ERROR_OPERATION_FAILED

Change-Id: If2e8bc8e1bff0c212cd0e1745ba7c9c3ca229b84
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
2 years agoRefine the explanation of cpu-boosting set/clear APIs 98/277598/3
Hyotaek Shim [Mon, 11 Jul 2022 03:53:25 +0000 (12:53 +0900)]
Refine the explanation of cpu-boosting set/clear APIs

Change-Id: I1132400b79b7ff008d0cf3ebaa54ae518417df11
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
2 years agoModify tid and pid from int to pid_t 45/277245/2 accepted/tizen/unified/20220704.213109 submit/tizen/20220704.075459
Unsung Lee [Mon, 4 Jul 2022 05:45:19 +0000 (14:45 +0900)]
Modify tid and pid from int to pid_t

Change-Id: I6bf4914fb1dc7f0c75c73e0292264b48625249bf
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoFix the specification of resource_get_cpu_boosting_level API 40/277240/1
Hyotaek Shim [Mon, 4 Jul 2022 04:59:23 +0000 (13:59 +0900)]
Fix the specification of resource_get_cpu_boosting_level API

Change-Id: I69ca14147de264c6b86cfb984a1aaf8da8289fd8

2 years agoplugin: implement resource_set_cpu_boosting 82/276982/12 accepted/tizen/unified/20220630.212013 submit/tizen/20220630.054823
Unsung Lee [Tue, 28 Jun 2022 11:20:03 +0000 (20:20 +0900)]
plugin: implement resource_set_cpu_boosting

Change-Id: Ibe5877898afa269653318a1fdfd28a8081753277
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoAdd API privilege declaration and fix typo in API spec 89/276989/4
Hyotaek Shim [Wed, 29 Jun 2022 02:40:05 +0000 (11:40 +0900)]
Add API privilege declaration and fix typo in API spec

Change-Id: Id5c6330ec069dfcc55407c44a5d5a122d1dfc818
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
2 years agoImprove explanation in cpu boosting API specification 60/276960/8 accepted/tizen/unified/20220629.021813 submit/tizen/20220628.084224
Hyotaek Shim [Tue, 28 Jun 2022 10:31:56 +0000 (19:31 +0900)]
Improve explanation in cpu boosting API specification

Also delete unnecessary pid field in cpu_boosting_level_info_t

Change-Id: I0bcddf62844e86869ab176abbbc1780d315f2342
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
2 years agoChange char * -> const char * in API arguments 15/276815/1 accepted/tizen/unified/20220627.133707 submit/tizen/20220627.034707
Hyotaek Shim [Mon, 27 Jun 2022 02:31:45 +0000 (11:31 +0900)]
Change char * -> const char * in API arguments

Change-Id: Ieeef1dee1aff587f4f744b9ccebb57b9d8b8c130
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
2 years agoDelete dlclose() and Move dlopen() 28/276628/5 accepted/tizen/unified/20220622.133907 submit/tizen/20220622.073052
Unsung Lee [Wed, 22 Jun 2022 04:37:47 +0000 (13:37 +0900)]
Delete dlclose() and Move dlopen()

do not call dlopen()/dlclose() on constructor/destructor respectively.
Instead, delete dlcose() and move dlopen() from constructor to APIs.

Change-Id: Id9f75d2dc2749321e96d6504c45ec06973995190
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoModify value of CPU_BOOSTING_LEVEL_* 17/276517/1 accepted/tizen/unified/20220621.140401 submit/tizen/20220620.015729
Unsung Lee [Mon, 20 Jun 2022 01:51:27 +0000 (10:51 +0900)]
Modify value of CPU_BOOSTING_LEVEL_*

Change-Id: Ieb3f61f3e77ec8bca274ce2d7f4eeac9c26d8bbd
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoDelete some package dependencies 11/276511/2
Unsung Lee [Mon, 20 Jun 2022 01:09:16 +0000 (10:09 +0900)]
Delete some package dependencies

Change-Id: Iafa2dd8caea32b06e21f28748f4bb5e29972c6ed
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
3 years agoRefine the description of cpu boosting APIs 06/276206/2
Hyotaek Shim [Mon, 13 Jun 2022 03:33:19 +0000 (12:33 +0900)]
Refine the description of cpu boosting APIs

Change-Id: I184055440daf2373fcc162c3bb7636f9af499d59
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agoMove header files to the destination 45/275745/4 accepted/tizen/unified/20220601.141537 submit/tizen/20220531.110301
Unsung Lee [Tue, 31 May 2022 08:50:52 +0000 (17:50 +0900)]
Move header files to the destination

Change-Id: I328c8adb166cd8c8c412263b74f1debca82a8785
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
3 years agoImplement CPU boosting plugin 67/275567/6 accepted/tizen/unified/20220528.144338 submit/tizen/20220526.112909
Unsung Lee [Thu, 26 May 2022 08:34:54 +0000 (17:34 +0900)]
Implement CPU boosting plugin

Change-Id: I0234087e4caa9f7dccf9ab7c9f7f3013fb9e1243
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
3 years agoChange API name for better consistency and specify details 79/274079/2
Hyotaek Shim [Thu, 21 Apr 2022 05:16:22 +0000 (14:16 +0900)]
Change API name for better consistency and specify details

Add resource_unregister_cpu_inheritance_destination() API

Change-Id: I1442d2fc1da905beb65b96a15048204f5e823d0b
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agoAdd resource_get_cpu_sched_boosting_level() API 84/273984/1 accepted/tizen/unified/20220420.135413 submit/tizen/20220420.055631
Hyotaek Shim [Tue, 19 Apr 2022 10:56:50 +0000 (19:56 +0900)]
Add resource_get_cpu_sched_boosting_level() API

Change-Id: I784131f24d514542d5037acc9fb9842ed9f00099
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agoAdd function declaration for CPU boosting APIs 40/273940/4
Hyotaek Shim [Mon, 18 Apr 2022 12:04:12 +0000 (21:04 +0900)]
Add function declaration for CPU boosting APIs

Change-Id: I9ac527fd70b41387e1f4e2e8d512774801a7dbe6
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agoInitialization 32/273632/2
Hyotaek Shim [Mon, 11 Apr 2022 05:44:11 +0000 (14:44 +0900)]
Initialization

Change-Id: I1d3207cf4e7c0a98bf2ff9823fae6541d5150712
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agoInitial empty repository master
Tizen Infrastructure [Fri, 8 Apr 2022 08:33:57 +0000 (08:33 +0000)]
Initial empty repository