platform/core/system/libsyscommon.git
13 months agoresource-manager: Validate attribute before update it 88/298588/1 accepted/tizen/8.0/unified/20231005.093814 accepted/tizen/unified/20230913.091610 tizen_8.0_m2_release
Youngjae Cho [Thu, 7 Sep 2023 12:44:00 +0000 (21:44 +0900)]
resource-manager: Validate attribute before update it

Add check_attr_validate() for all NORMAL type getter, making it affect
the update_resource_attr().

Change-Id: Ic2be4c565226fa4f9a4be14118a44bd9aa5a9468
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
13 months agoplugin-api: deviced: Remove _GET_/_SET_ from attribute name 85/298585/1
Youngjae Cho [Mon, 11 Sep 2023 05:27:30 +0000 (14:27 +0900)]
plugin-api: deviced: Remove _GET_/_SET_ from attribute name

Change-Id: I632a52421adc20411716dfd633e52f3d2e36fd8e
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
13 months agoresource-manager: Change type name of multiple data 84/298584/1
Youngjae Cho [Wed, 6 Sep 2023 07:49:26 +0000 (16:49 +0900)]
resource-manager: Change type name of multiple data

SYSCOMMON_RESMAN_DATA_TYPE_UINT64_UINT64
 -> SYSCOMMON_RESMAN_DATA_TYPE_2_UINT64

SYSCOMMON_RESMAN_DATA_TYPE_UINT64_UINT64_UINT64
 -> SYSCOMMON_RESMAN_DATA_TYPE_3_UINT64

SYSCOMMON_RESMAN_DATA_TYPE_UINT64_UINT64_UINT64_UINT64
 -> SYSCOMMON_RESMAN_DATA_TYPE_4_UINT64

Change-Id: I840db7996a3c7a0dba7afaa8465489a038edaeb0
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
13 months agoplugin-api: resourced: Add lmk_try_count in get_kill_candidates_post_with_wss 78/298378/2 accepted/tizen/unified/20230907.175321
Unsung Lee [Tue, 5 Sep 2023 02:24:00 +0000 (11:24 +0900)]
plugin-api: resourced: Add lmk_try_count in get_kill_candidates_post_with_wss

resourced-lmk-governor needs to know the number of killing cycle.
This is because, the governor should know whether
memory thrasing happens or not. If lowmem state is not recovered during the
threshold cycle, then the governor skips working set size calculation and
does not give benefit to apps with effcient memory usage.

Change-Id: I4ba581d10b967665ae3155205cba9b30b0e3fa6b
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
13 months agoplugin-api: resourced: Add working set size related info in task_info 77/298377/2
Unsung Lee [Tue, 5 Sep 2023 01:59:14 +0000 (10:59 +0900)]
plugin-api: resourced: Add working set size related info in task_info

resourced requires active, inactive, and swap memory size,
because working set size-based resourced-lmk-governor should know them
to calculate memory efficiency of each app.
Normally, this information is located in memory.stat of memcg.
In addition, some apps are free from LMK according to working set size.

Change-Id: I8d20a3be57391fb4813f42a4704dc91f43ce1101
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
13 months agoplugin-api: resourced: Move common struct and enum from *.h to *-interface.h 83/298283/2
Unsung Lee [Tue, 5 Sep 2023 01:41:26 +0000 (10:41 +0900)]
plugin-api: resourced: Move common struct and enum from *.h to *-interface.h

Move common struct and enum, referened by both resourced and resourced backend,
from syscommon-plugin-resourced-memory-lmk.h
to syscommon-plugin-resourced-memory-lmk-interface.h for consistency.

*.h can be referenced only by resourced. On the other hand, *-interface.h can
be referenced by both side. Therefore, common struct and enum should be
defined in *-interface.h.

Change-Id: I0529e21da6688eeebb9a0583521dc69c2e400f2c
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
13 months agoresource-manager: Add missing cases for unset_resource_attr_interest() 06/298406/1
Youngjae Cho [Wed, 6 Sep 2023 11:16:21 +0000 (20:16 +0900)]
resource-manager: Add missing cases for unset_resource_attr_interest()

Change-Id: Ibc6b4d62c3209a8826d349ae3b818c8a9c68e4f9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
13 months agoplugin-api: resourced: Add is_cpu_busy argument into govenor func 51/298251/2 accepted/tizen/unified/20230906.014630
Unsung Lee [Mon, 4 Sep 2023 06:36:47 +0000 (15:36 +0900)]
plugin-api: resourced: Add is_cpu_busy argument into govenor func

Add is_cpu_busy argument into
syscommon_plugin_resourced_cpu_boosting_governor_govern_request() function
to check whether system cpu is busy or not.
If system cpu is not busy, then resourced cpu boosting will ignore stall event
immediately.

Function called cpu boosting governor is modified:
  - int syscommon_plugin_resourced_cpu_boosting_governor_govern_request
    (GHashTable *cpu_boosting_info_table,
     cpu_boosting_level_e cpu_boosting_level,
     GSList **cpu_boosting_controller_action, bool *is_cpu_busy);
     * output argument called is_cpu_busy is added.

Change-Id: I0827f4b5ac5ffec8c64f34c124e89176e24a6c3c
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
13 months agoplugin-api: resourced: Add is_cpu_contention_alleviated 50/298250/2
Unsung Lee [Wed, 30 Aug 2023 08:09:51 +0000 (17:09 +0900)]
plugin-api: resourced: Add is_cpu_contention_alleviated

Add is_cpu_contention_alleviated function to check whether
cpu contention is alleviated or not.

Prototype of new function is like below:
  - bool syscommon_plugin_resourced_is_cpu_contention_alleviated(
               guint timer_id, guint latest_timer_id);
    * After a stall event is monitored, a timer with some interval set.
      If no more stall events between setting timer and timeout,
      timer_id is equal to latest_timer_id.

Change-Id: I0136f445827ae49d002fd8dcb0919cef0ada40b9
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
14 months agoplugin-api: resourced: Add cpu boosting module 28/297128/6
Unsung Lee [Wed, 9 Aug 2023 08:17:47 +0000 (17:17 +0900)]
plugin-api: resourced: Add cpu boosting module

Add cpu boosting governor function to be called when CPU PSI is triggered
in resourced. The goal of cpu boosting governor is finding out cpu contention reason
and making actions to do in cpu boosting controller.

A new function called cpu boosting governor is added:
  - int syscommon_plugin_resourced_cpu_boosting_governor_govern_request
(GHashTable *cpu_boosting_info_table,
 cpu_boosting_level_e cpu_boosting_level,
 GSList **cpu_boosting_controller_action);
    * This function receives cpu_boosting_info_table and cpu_boosting_level
      as inputs and gives cpu_boosting_controller_action as an output.
      If return value of this function is not 0,
      then cpu_boosting_controller_action is meaningless.

Change-Id: Id6f7854278560fd8816a2e15021cccd7261b7027
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
14 months agoplugin-api: deviced: Add assert() to prevent NULL dereferencing 23/297823/1
Youngjae Cho [Fri, 25 Aug 2023 00:57:55 +0000 (09:57 +0900)]
plugin-api: deviced: Add assert() to prevent NULL dereferencing

Change-Id: I55a46976ff30100468e249e02a769099da9fa0f3
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: deviced: Add syscommon_plugin_deviced_display_load_config() 21/297721/2 accepted/tizen/unified/20230825.044252 accepted/tizen/unified/riscv/20230829.072055
Youngjae Cho [Wed, 23 Aug 2023 08:09:44 +0000 (17:09 +0900)]
plugin-api: deviced: Add syscommon_plugin_deviced_display_load_config()

Add plugin API that loads display configuration that intialized by
plugin.

Change-Id: Ie4767a61db7dd1a222866a23f71c98b056a58607
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: deviced: Add attribute for display config 09/297709/1
Youngjae Cho [Wed, 23 Aug 2023 06:46:51 +0000 (15:46 +0900)]
plugin-api: deviced: Add attribute for display config

New attribute:
 - id: DEVICED_DISPLAY_ATTR_INT_GET_CONFIG_POWERKEY_DOUBLEPRESS
 - type: SYSCOMMON_RESMAN_DATA_TYPE_INT
 - setter: X
 - getter: O

New attribute:
 - id: DEVICED_DISPLAY_ATTR_INT_GET_CONFIG_LONGPRESS_INTERVAL
 - type: SYSCOMMON_RESMAN_DATA_TYPE_DOUBLE
 - setter: X
 - getter: O

New attribute:
 - id: DEVICED_DISPLAY_ATTR_INT_GET_CONFIG_TOUCH_WAKEUP
 - type: SYSCOMMON_RESMAN_DATA_TYPE_INT
 - setter: X
 - getter: O

Change-Id: I841459f76e6a4a75379c53d9875006823917c570
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: common: Remove log macro from common.h to use libsyscommon/log.h 70/297670/1
Chanwoo Choi [Tue, 22 Aug 2023 10:55:51 +0000 (19:55 +0900)]
plugin-api: common: Remove log macro from common.h to use libsyscommon/log.h

Change-Id: I4de1c0b035397d4c58a702665696bd64233d4885
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
14 months agoplugin-api: Change the header including style and remove duplicate common.h 69/297669/2
Chanwoo Choi [Tue, 22 Aug 2023 10:43:10 +0000 (19:43 +0900)]
plugin-api: Change the header including style and remove duplicate common.h

In order to specify the path of header file, change the header including
style as following and the remove the duplicated common.h including log
macro.

- Before header including style
  #include "syscommon-plugin-common.h"
  #include "syscommon-plugin-common-interface.h"

- After header including style
  #include <system/syscommon-plugin-common.h>
  #include <system/syscommon-plugin-common-interface.h>

Change-Id: I723114be26e7891661dcc7ac02fd7d1ceb8dc0a1
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
14 months agoplugin-api: common: Add SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY plugin module 19/297619/3
Chanwoo Choi [Mon, 21 Aug 2023 10:12:32 +0000 (19:12 +0900)]
plugin-api: common: Add SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY plugin module

Add SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY for display plugin module.

[Detailed description]
1. Newly added SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY plugin module
- module             : SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY
- library_name       : "/usr/lib/system/plugin/libplugin-backend-deviced-display.so"
- library_name_64bit : "/usr/lib64/system/plugin/libplugin-backend-deviced-display.so"
- symbol_name        : "system_plugin_backend_deviced_display_data"

2. Newly added SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY plugin api
- int syscommon_plugin_deviced_display_get_backend(void)
  : Load deviced display plugin-backend from above library_name/library_name_64bit path
- int syscommon_plugin_deviced_display_put_backend(void);
  : Unload Deviced display plugin-backend

Change-Id: I51ea96d56046d09b10d449c1455c97575837fdee
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
14 months agoplugin-api: deviced: Add attribute for power history log 46/297646/4 accepted/tizen/unified/20230823.021351
Youngjae Cho [Tue, 22 Aug 2023 07:42:02 +0000 (16:42 +0900)]
plugin-api: deviced: Add attribute for power history log

New attribute:
 - id: DEVICED_POWER_ATTR_TUPLE2_SET_HISTORY_LOG
 - type: DEVICED_POWER_ATTR_TUPLE2_SET_HISTORY_LOG
 - setter: O
 - getter: X
 - 1st param: enum syscommon_deviced_power_log_type
 - 2nd param: secondary information of type integer

In addition, added enum syscommon_deviced_power_log_type for the power
history log.

Change-Id: Ibdebeac6fa97bfd6705c251b694314dad11a98e6
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: deviced: Add deviced_event DEVICED_EVENT_INPUT_BACKKEY 45/297645/4
Youngjae Cho [Tue, 22 Aug 2023 02:57:32 +0000 (11:57 +0900)]
plugin-api: deviced: Add deviced_event DEVICED_EVENT_INPUT_BACKKEY

Change-Id: If05c2d43ec9230cc085465aee42dda8ab8e1b63a
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: deviced: Add attribute for release all display lock 44/297644/4
Youngjae Cho [Tue, 22 Aug 2023 02:32:05 +0000 (11:32 +0900)]
plugin-api: deviced: Add attribute for release all display lock

Change-Id: I988fdb0a18073a88f3a63b399f58105959c53ceb
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: deviced: Add attribute for touch event blocked 21/297621/4
Youngjae Cho [Tue, 22 Aug 2023 02:15:23 +0000 (11:15 +0900)]
plugin-api: deviced: Add attribute for touch event blocked

New attribute:
 - id: DEVICED_DISPLAY_ATTR_INT_GET_TOUCH_EVENT_BLOCKED
 - type: SYSCOMMON_RESMAN_DATA_TYPE_INT
 - setter: X
 - getter: O

Change-Id: Idf5030debd46da3ed88851e61198ddd52cbd3e85
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: deviced: Add attribute for display actor capability 12/297612/5
Youngjae Cho [Mon, 21 Aug 2023 11:51:53 +0000 (20:51 +0900)]
plugin-api: deviced: Add attribute for display actor capability

New attribute:
 - id: DEVICED_DISPLAY_ATTR_UINT64_GET_ACTOR_CAPABILITY
 - type: SYSCOMMON_RESMAN_DATA_TYPE_UINT64_WITH_2_USER_DATA
 - setter: X
 - getter: O
 - 1st param: syscommon_deviced_display_actor_id
 - 2nd param: syscommon_deviced_display_capability
 It finds whether an actor id has an capability.

New attribute:
 - id: DEVICED_DISPLAY_ATTR_TUPLE3_SET_ACTOR_CAPABILITY
 - type: SYSCOMMON_RESMAN_DATA_TYPE_UINT64_UINT64_UINT64
 - setter: O
 - getter: X
 - 1st param: syscommon_deviced_display_actor_id
 - 2nd param: syscommon_deviced_display_capability
 - 3rd param: 0: reset,  1: set
 It sets/resets capability of an actor id.

Change-Id: Ib63c31f10c5180b48cd677be1d6e3e11538580aa
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoresource-manager: Gather the related funciton of set_resource_attr_uint64 90/297590/3
Chanwoo Choi [Mon, 21 Aug 2023 09:26:29 +0000 (18:26 +0900)]
resource-manager: Gather the related funciton of set_resource_attr_uint64

Gather the related funciton of set_resource_attr_uint64 in order to
improve the readability as following:

 int syscommon_resman_set_resource_attr_uint64(int resource_id, u_int64_t attr_id, u_int64_t data);
 int syscommon_resman_set_resource_attr_uint64_2(int resource_id, u_int64_t attr_id,
                                        u_int64_t data1, u_int64_t data2);
 int syscommon_resman_set_resource_attr_uint64_3(int resource_id, u_int64_t attr_id,
                                        u_int64_t data1, u_int64_t data2, u_int64_t data3);
 int syscommon_resman_set_resource_attr_uint64_4(int resource_id, u_int64_t attr_id,
                                        u_int64_t data1, u_int64_t data2, u_int64_t data3, u_int64_t data4);

Change-Id: I45e2a8736af3e1f2a397298629c50fe78acd2e1a
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
14 months agoresource-manager: Add new getter with user data 87/297587/5
Chanwoo Choi [Mon, 21 Aug 2023 09:03:45 +0000 (18:03 +0900)]
resource-manager: Add new getter with user data

Until now, getter function has only passed the data to get the data
without any other arguments. But, it has the constraint which is not
able to pass the user data and then get the data.

So thet add new following getter funciton with passed user data:
- int syscommon_resman_get_resource_attr_uint64_with_1_user_data(
int resource_id, u_int64_t attr_id,
u_int64_t *user_data1,
u_int64_t *data);
  : This function is able to pass the one user data in order to get data
  from resource attirbute.
  : SYSCOMMON_RESMAN_DATA_TYPE_UINT64_WITH_1_USER_DATA data type
  should be used for this new getter function.

- int syscommon_resman_get_resource_attr_uint64_with_2_user_data(
int resource_id, u_int64_t attr_id,
u_int64_t *user_data1, u_int64_t *user_data2,
u_int64_t *data);
  : This function is able to pass the two user data in order to get data
  from resource attirbute.
  : SYSCOMMON_RESMAN_DATA_TYPE_UINT64_WITH_2_USER_DATA data type
  should be used for this new getter function.

Change-Id: Ic406fe4bad5e952472769f4ec634544a4d45d0a8
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
14 months agoplugin-api: deviced: Add power attribute and enum for vital mode 81/297581/1
Youngjae Cho [Mon, 21 Aug 2023 08:08:38 +0000 (17:08 +0900)]
plugin-api: deviced: Add power attribute and enum for vital mode

New attribute:
 - id: DEVICED_POWER_ATTR_INT_GET_VITAL_MODE
 - type: SYSCOMMON_RESMAN_DATA_TYPE_INT
 - setter: X
 - getter: O

Change-Id: I8b1819d0171b0406b1eaf2b92d9e044e55408df2
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: deviced: Replace macro MATCH() with strncmp() 80/297580/1
Youngjae Cho [Mon, 21 Aug 2023 08:28:47 +0000 (17:28 +0900)]
plugin-api: deviced: Replace macro MATCH() with strncmp()

The macro MATCH() has come from the deviced, and has been working
well as it is, currently, always built with that macro definition
within the deviced. Fix it not to be associated with the deviced
so that it is able to be built alone.

Change-Id: I21fe6f33f14ad6037592af12c6e1404f8ef128d1
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: deviced: Add attribute for custom brightness 10/297510/1
Youngjae Cho [Mon, 21 Aug 2023 06:49:29 +0000 (15:49 +0900)]
plugin-api: deviced: Add attribute for custom brightness

New attribute:
 - id: DEVICED_DISPLAY_ATTR_INT_CUSTOM_BRIGHTNESS
 - type: SYSCOMMON_RESMAN_DATA_TYPE_INT
 - setter: O
 - getter: O
 It gets whether custom brightness is set or not. And it enables the
 custom  brightness when it sets attrbute by a value other than 0.

Change-Id: I6ba2c27f82d76933633e3322248d99fd2bc6df35
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: common: Fix wrong symbol name of SYSCOMMON_PLUGIN_MODULE_DEVICED_BATTERY 63/297463/2 accepted/tizen/unified/20230821.162308
Chanwoo Choi [Fri, 18 Aug 2023 12:17:33 +0000 (21:17 +0900)]
plugin-api: common: Fix wrong symbol name of SYSCOMMON_PLUGIN_MODULE_DEVICED_BATTERY

Change-Id: I810cd3cbbf6f78f3bd4d20c925912d90140c127e
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
14 months agoplugin-api: common: Add SYSCOMMON_PLUGIN_MODULE_DEVICED_INPUT plugin module 16/297416/4
Chanwoo Choi [Thu, 17 Aug 2023 05:31:55 +0000 (14:31 +0900)]
plugin-api: common: Add SYSCOMMON_PLUGIN_MODULE_DEVICED_INPUT plugin module

Add SYSCOMMON_PLUGIN_MODULE_DEVICED_INPUT for input plugin module.

[Detailed description]
1. Newly added SYSCOMMON_PLUGIN_MODULE_DEVICED_INPUT plugin module
- module             : SYSCOMMON_PLUGIN_MODULE_DEVICED_INPUT
- library_name       : "/usr/lib/system/plugin/libplugin-backend-deviced-input.so"
- library_name_64bit : "/usr/lib64/system/plugin/libplugin-backend-deviced-input.so"
- symbol_name        : "system_plugin_backend_deviced_input_data"

2. Newly added SYSCOMMON_PLUGIN_MODULE_DEVICED_INPUT plugin api
- int syscommon_plugin_deviced_input_get_backend(void)
  : Load Deviced input plugin-backend from above library_name/library_name_64bit path
- int syscommon_plugin_deviced_input_put_backend(void);
  : Unload Deviced input plugin-backend
- void syscommon_plugin_deviced_input_event_cb(struct timeval time, unsigned short type,
unsigned short keycode, unsigned int keyvalue);
  : Callback function to handle the key event when input key event happen

Change-Id: I0194c88da69abff226c92846637c0e000d58e019
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
14 months agoplugin-api: deviced: Add struct syscommon_deviced_display_state_info 60/297460/1
Youngjae Cho [Fri, 18 Aug 2023 10:45:23 +0000 (19:45 +0900)]
plugin-api: deviced: Add struct syscommon_deviced_display_state_info

Change-Id: I4b9c8e605fa8c111d95fe9dbb09710d6ba2d33e9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: deviced: Add prefix 'syscommon' to enum and struct 47/297447/1
Youngjae Cho [Fri, 18 Aug 2023 10:06:47 +0000 (19:06 +0900)]
plugin-api: deviced: Add prefix 'syscommon' to enum and struct

Change-Id: Ie08a5397ef8829ef27eb3a8010d599941352e591
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: deviced: Add struct deviced_display_config 37/297437/1
Youngjae Cho [Fri, 18 Aug 2023 06:44:17 +0000 (15:44 +0900)]
plugin-api: deviced: Add struct deviced_display_config

Add display configuration structure that can be accessed by both
display core and plugin. And the below enums also be added
 - enum deviced_dpms_type
  : Type that DPMS is working on top of.

 - enum deviced_display_orientation
  : Direction that display hardware is attached to.

Change-Id: I2c36f4d38ce654d80843ff21cbf1f702c3c034c9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: deviced: Add display DPMS attribute and enum 82/297382/1
Youngjae Cho [Thu, 17 Aug 2023 12:12:59 +0000 (21:12 +0900)]
plugin-api: deviced: Add display DPMS attribute and enum

New attribute:
 - id: DEVICED_DISPLAY_ATTR_INT_DPMS_STATE
 - type: SYSCOMMON_RESMAN_DATA_TYPE_INT
 - setter: O
 - getter: O
 It sets/gets DPMS value type of enum deviced_dpms_state.

New attribute:
 - id: DEVICED_DISPLAY_ATTR_TUPLE2_SET_DISPLAY_DIRECT
 - type: SYSCOMMON_RESMAN_DATA_TYPE_UINT64_UINT64
 - setter: O
 - getter: X
 - 1st param: enum deviced_dpms_state
 - 2nd param: enum deviced_event
 It bypasses display state transition routine. Instead it sets DPMS
 directly.

Change-Id: I077c4066288f8e0f8856e4f78bbc6e7e1283f3e6
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: deviced: power: Add struct syscommon_plugin_deviced_power_trans_info 71/297371/3
Chanwoo Choi [Thu, 17 Aug 2023 10:51:40 +0000 (19:51 +0900)]
plugin-api: deviced: power: Add struct syscommon_plugin_deviced_power_trans_info

Add struct syscommon_plugin_deviced_power_trans_info which contains the
power transition information.

[Detailed description]
struct syscommon_plugin_deviced_power_trans_info
- curr : Current power state
- next : Next power state for transition
- reason : Transition reason when changing the state from curr to next
- void *data : Passed data of transition information

Change-Id: I69450db85c4303f77f7675270a4a1890e0f98bbe
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
14 months agoplugin-api: deviced: power: Add syscommon_plugin_deviced_power_convert_to_power_state() 69/297369/3
Chanwoo Choi [Thu, 17 Aug 2023 10:44:15 +0000 (19:44 +0900)]
plugin-api: deviced: power: Add syscommon_plugin_deviced_power_convert_to_power_state()

syscommon_plugin_deviced_power_convert_to_power_state() plugin api
converts the power action string to DEVICED_POWER_STATE_* enumeration.

Change-Id: I14fb07cfa64527fceba58116977b32986c14edda
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
14 months agolibsyscommon: Add CRITICAL_LOG() 78/297378/1
Youngjae Cho [Thu, 17 Aug 2023 11:30:14 +0000 (20:30 +0900)]
libsyscommon: Add CRITICAL_LOG()

It requires macro definition ENABLE_DLOG and CRITICAL_LOG_ON.

Change-Id: Ic25393d9c96cd24047cff33cdaf72a25cf627706
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agodbus-iface-system: Add event dbus interface of deviced 60/297360/4
Chanwoo Choi [Thu, 17 Aug 2023 09:06:41 +0000 (18:06 +0900)]
dbus-iface-system: Add event dbus interface of deviced

Add new deviced dbus interface to broadcast the event id.

[Detailed description of newly added dbus information]
- DEVICED_PATH_EVENT "/Org/Tizen/System/DeviceD/Event"
- DEVICED_INTERFACE_EVENT "org.tizen.system.deviced.Event"
- DEVICED_SIGNAL_EVENT_ID "Id"

Change-Id: I5a444639b64bb47ee10f32a092b9879850c26000
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
14 months agoplugin-api: deviced: power: Add new DEVICED_POWER_ATTR_TUPLE2_SET_WAKELOCK 59/297359/2
Chanwoo Choi [Thu, 17 Aug 2023 05:44:43 +0000 (14:44 +0900)]
plugin-api: deviced: power: Add new DEVICED_POWER_ATTR_TUPLE2_SET_WAKELOCK

DEVICED_POWER_ATTR_TUPLE2_SET_WAKELOCK attribute provides the
setter function to acquire the wakelock in order to prevent the
suspending.

- attr id   : DEVICED_POWER_ATTR_TUPLE2_SET_WAKELOCK
- setter    : O
- getter    : X
- 1st param : Event ID
- 2nd param : Timeout to release the wakelock count

Change-Id: If0daee6ffc53838313a661feedd5b2fae45af136
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
14 months agoplugin-api: deviced: Add enum deviced_notifier 42/297342/3
Youngjae Cho [Thu, 17 Aug 2023 05:30:43 +0000 (14:30 +0900)]
plugin-api: deviced: Add enum deviced_notifier

Change-Id: If2b3960557996dd483d0a77f4db643a77914bd3f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agolibsyscommon: Add common log.h to print log via dlog 36/297336/1
Chanwoo Choi [Thu, 17 Aug 2023 05:11:24 +0000 (14:11 +0900)]
libsyscommon: Add common log.h to print log via dlog

All system service uses the dlog to print the logging.
So that add the common log.h file using dlog.

Change-Id: Id3f594bb5607db807f8608670f9e60839146d917
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
14 months agoplugin-api: deviced: Add display state set attribute 54/297254/4 accepted/tizen/unified/20230818.183535 accepted/tizen/unified/riscv/20230817.113312
Youngjae Cho [Wed, 16 Aug 2023 02:18:29 +0000 (11:18 +0900)]
plugin-api: deviced: Add display state set attribute

 - DEVICED_DISPLAY_ATTR_TUPLE2_SET_CURRENT_STATE
  : Attribute for setting display state. It requires two parameter,
    each type of enum deviced_display_state and enum deviced_event.
    The first one designates state to be changed and the latter one
    specifies reason why the state change has been triggered.

When it comes to the state setter, it is necessary to reset screen
timeout of the changed state. Therefore the below values have been
added.
 - DEVICED_EVENT_DISPLAY_SCREEN_TIMEOUT
  : Event for screen timeout expiration

 - DEVICED_DISPLAY_SCREEN_TIMEOUT_INFINITE
  : Magic number for setting infinite screen timeout

Change-Id: I616a5ecd009dfb8c5aa4710ed68f2b09f5fe2981
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: deviced: Add display state get attribute 53/297253/2
Youngjae Cho [Thu, 10 Aug 2023 04:17:15 +0000 (13:17 +0900)]
plugin-api: deviced: Add display state get attribute

- DEVICED_DISPLAY_ATTR_INT_GET_CURRENT_STATE
  : Reprenest the current display state. Only gettable.

Change-Id: I170f62ce68ae31c60775d1253d9e83b6f0e706ce
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: deviced: Add display state 53/297053/1
Youngjae Cho [Wed, 9 Aug 2023 11:27:27 +0000 (20:27 +0900)]
plugin-api: deviced: Add display state

It replaces existing enum state_t of the deviced.
 - S_START    => DEVICED_DISPLAY_STATE_START
 - S_NORMAL   => DEVICED_DISPLAY_STATE_ON
 - S_LCDON    => DEVICED_DISPLAY_STATE_ON
 - S_LCDDIM   => DEVICED_DISPLAY_STATE_DIM
 - S_LCDOFF   => DEVICED_DISPLAY_STATE_OFF
 - S_STANDBY  => removed
 - S_SLEEP    => DEVICED_DISPLAY_STATE_SLEEP*
 - S_SUSPEND  => removed
 - S_POWEROFF => removed

[*] Technically, the DEVICED_DISPLAY_STATE_SLEEP cannot be a state of
display. It should be a state of power, not display. However, current
code indiscriminately uses S_SLEEP state as one of the display state.
This will be fixed to make power module exclusively handle sleep, and
the enum itself will be removed accordingly.

The other removed enums are not being used.

Change-Id: I1f22379e730311c211b36cd516a020eadd730938
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoresource-manager: Add convenient macro SYSCOMMON_RESOURCE_ID() 44/297044/2
Youngjae Cho [Wed, 9 Aug 2023 08:45:23 +0000 (17:45 +0900)]
resource-manager: Add convenient macro SYSCOMMON_RESOURCE_ID()

 The resource-manage APIs are working on top of the resource_id. Thus
an API user must get resource_id in advance to access resource instance.
Currently resource-manager provides syscommon_resman_get_resource_id()
for this purpose, however, it gets resource_id via parameter. Therefore,
it cannot pass resource_id directly to a function parameter.
 On the other hand, the convenient macro returns resource_id on success,
-1 on failure. As it returns reosurce_id, it can be used as an inline
parameter.

Change-Id: I45426096144c2a47de2554cbf2856b9f78d5b51d
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: deviced: Include necessary header 43/297043/1
Youngjae Cho [Wed, 9 Aug 2023 07:39:33 +0000 (16:39 +0900)]
plugin-api: deviced: Include necessary header

Currently, the syscommon-plugin-deviced-display.h has nothing though,
those headers will be necessary for the display plugin-api. Therefore
added them in advance.

Change-Id: I5a0e20e627ca5845a52e1a47b9dc474f8759600d
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoresource-manager: Fix checking attribute and control id validation 13/296613/8 accepted/tizen/unified/riscv/20230809.013303
Dongwoo Lee [Wed, 2 Aug 2023 05:53:23 +0000 (14:53 +0900)]
resource-manager: Fix checking attribute and control id validation

In order to prevent misbehavior during code genenration or
optimization for builtin function clzll of gcc due to undefined
operation, this fixes condition for checking attribute and control id
of resources properly.

Change-Id: Icef57b1ec27c54afdaf1ef93c94a069c4d8855be
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
14 months agoplugin-api: deviced: Add enum deviced_event 35/296935/2
Youngjae Cho [Mon, 7 Aug 2023 10:34:28 +0000 (19:34 +0900)]
plugin-api: deviced: Add enum deviced_event

 It replaces enum of the deviced, INTERNAL_LOCK_*, and it enumerates events
that the deviced can handle.
 The events are grouped by module name. And each group can have a single
'General' event and several 'Specific' events. General event is named with
module name. Specific event have suffix to the general event, describing
what the event exactly is. For example,
   - DEVICED_EVENT_BATTERY
     : Representative event of battery event. Represents overall events
       of battery and can be used by general battery event.

   - DEVICED_EVENT_BATTERY_CAPACITY_LOW
     : Specific event of battery event. Denotes battery capacity has
       entered into or escaped from low status.

Change-Id: I4bd752c2d5303ff25d7a070a621fe122f7d0f0dc
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: deviced: Add display max brightness attributes 85/296885/1
Youngjae Cho [Fri, 4 Aug 2023 07:28:42 +0000 (16:28 +0900)]
plugin-api: deviced: Add display max brightness attributes

- DEVICED_DISPLAY_ATTR_INT_GET_MAX_BRIGHTNESS
  : Represent the max brightness. Only gettable.

Change-Id: I7b599eec0a1e6a5704b826478e3030f6cf9c2ad6
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoplugin-api: deviced: Add DEVICED_RESOURCE_TYPE_DISPLAY 59/296759/4
Youngjae Cho [Fri, 4 Aug 2023 04:49:50 +0000 (13:49 +0900)]
plugin-api: deviced: Add DEVICED_RESOURCE_TYPE_DISPLAY

Deviced service controls the Display device.
When controlling the Display device of deviced
via resman (resource-manager), DEVICED_RESOURCE_TYPE_DISPLAY will be used
to control the Display attribute.

Change-Id: Iec69c2edf2ec18ef82641bc04ca31e9b2c5aaa47
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
14 months agoresource-manager: Cleanup uninitialized object correctly 58/296758/3
Youngjae Cho [Fri, 4 Aug 2023 03:08:11 +0000 (12:08 +0900)]
resource-manager: Cleanup uninitialized object correctly

 When create_resource() fails to set interest bit, a resource instance
fails to be initialized completely. At that point of failure, however,
the resource instance already has been registered to the hashtable,
g_resource_hash_table. Therefore, it is necessary to remove it from the
hashtable.

Change-Id: I26d392f6645ef9871a10de91117f69226f753638
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
15 months agoresource-manager: Add N-tuple setter to pass multiple parameter 28/296628/6 accepted/tizen/unified/20230803.174812 accepted/tizen/unified/20230809.071927
Chanwoo Choi [Wed, 2 Aug 2023 08:26:17 +0000 (17:26 +0900)]
resource-manager: Add N-tuple setter to pass multiple parameter

Add N-tuple setter function of resource manager to support the case
of when some attribute requires the multi paramters as setter.

[Newly added setter of resource-manager]
- int syscommon_resman_set_resource_attr_uint64_2(
int resource_id, u_int64_t attr_id,
u_int64_t data1, u_int64_t data2)
 : It pass the two parameter to the specific attribute which requires
   the two parameter as setter.

- int syscommon_resman_set_resource_attr_uint64_3(
int resource_id, u_int64_t attr_id,
u_int64_t data1, u_int64_t data2, u_int64_t data3)
 : It pass the three parameter to the specific attribute which requires
   the three parameter as setter.

- int syscommon_resman_set_resource_attr_uint64_4(
int resource_id, u_int64_t attr_id,
u_int64_t data1, u_int64_t data2, u_int64_t data3, u_int64_t data4)
 : It pass the four parameter to the specific attribute which requires
   the four parameter as setter.

[Newly added data type of resource manager]
- SYSCOMMON_RESMAN_DATA_TYPE_UINT64_UINT64
 : This data type include the two of u_int64 data type
- SYSCOMMON_RESMAN_DATA_TYPE_UINT64_UINT64_UINT64
 : This data type include the three of u_int64 data type
- SYSCOMMON_RESMAN_DATA_TYPE_UINT64_UINT64_UINT64_UINT64
 : This data type include the four of u_int64 data type

Change-Id: I8c659e5a9f5447e7aecb17c71005e5fa939960e8
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
15 months agoresource-manager: Fix bug of set_resource_attr_value_data() 21/296621/3
Youngjae Cho [Wed, 2 Aug 2023 07:57:51 +0000 (16:57 +0900)]
resource-manager: Fix bug of set_resource_attr_value_data()

It must check existence of setter instead of getter.

Change-Id: I1e34647390257ba1ac0c580b35bf1934eeb10d18
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
15 months agoresource-manager: Fix BIT() to SYSCOMMON_BIT() 00/296600/5
Youngjae Cho [Tue, 1 Aug 2023 08:56:28 +0000 (17:56 +0900)]
resource-manager: Fix BIT() to SYSCOMMON_BIT()

The BIT() is too general so that it is possible to collide with other
header when it is imported. Therefore, added prefix for the macro.

Change-Id: Idc999d6c09364bfc9fbc0dc93fb63c1d5eeea995
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
15 months agoresource-manager: Add syscommon_resman_get_resource_id() 99/296599/5
Youngjae Cho [Tue, 1 Aug 2023 05:00:08 +0000 (14:00 +0900)]
resource-manager: Add syscommon_resman_get_resource_id()

 It is necessary that a plugin know about resource_id so that the plugin
invoke resource-manager functions that works on top of resource_id. To
this end, added getter for resource_id.
 - syscommon_resman_get_resource_id()
     The function gets resource_id of the given type. The id is resource
     instance created first.
 - syscommon_resman_get_number_of_instance()
     The function gets how may resource instances have been created
     on a specific resource type.

 To support these operations, the resource-manager internally manages
hashtable dedicated to reosurce_id. The hashtable maps resource_type
into head of resource_id list.

Change-Id: I9d0df9a098444af506a94a81d14fae0f20bc1e04
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
15 months agoplugin-api: deviced: Add skeleton header for power module 28/296528/7
Youngjae Cho [Mon, 31 Jul 2023 07:17:45 +0000 (16:17 +0900)]
plugin-api: deviced: Add skeleton header for power module

syscommon-plugin-deviced-common-interface.h
 - Define common types and macros that can be commonly utilized over
   the whole modules, by both core and plugin.
 - Added enum deviced_resource_type so that all modules can share the
   enum. This is because the enum must be unique for each module.

syscommon-plugin-deviced-power.h
 - Contain plugin-api functions that invoking plugin functions
   from the deviced core.

syscommon-plugin-deviced-power-interface.h
 - Contain types and macros that can be utilized by both core and
   plugin.

Change-Id: Iab8bc083a3610b720222df284f880d961fb75188
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
15 months agoplugin-api: resourced: Pass oom level to LMK governor post for fg app 33/296333/7
Unsung Lee [Tue, 25 Jul 2023 11:21:34 +0000 (20:21 +0900)]
plugin-api: resourced: Pass oom level to LMK governor post for fg app

LMK governor post function reordering foreground app candidates
requires oom level, so pass oom level to this post function.

Change-Id: I77b24eb298506698fdef73d8136990734eb0ef24
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
15 months agoplugin-api: resourced: Add enum syscommon_resourced_memory_lmk_oom_level 32/296332/5
Unsung Lee [Tue, 25 Jul 2023 10:09:00 +0000 (19:09 +0900)]
plugin-api: resourced: Add enum syscommon_resourced_memory_lmk_oom_level

Add enumeration of oom level into libsyscommon to reference it
from both resourced and resourced plugin-backend

Oom level will be referenced by resourced and resourced backend
when LMK is triggered by low memory. Therefore, it should be located in
common library (i.e., libsyscommon)

Change-Id: I2dcc1c7e3768dccf5db256845614557b6d8dc60c
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
15 months agoplugin-api: resourced: Add a skeleton of get_kill_candidates_post funcs 95/294695/14
Unsung Lee [Thu, 22 Jun 2023 02:43:05 +0000 (11:43 +0900)]
plugin-api: resourced: Add a skeleton of get_kill_candidates_post funcs

Add a skeleton of three get_kill_candidates_post funcs. These functions
are directly mapped to get_kill_candidates_post funcs in resourced backend.

Support LMK governor post funcs which will be called after
LMK governor function to reorder a victim candidate list

resourced supports three type of get_kill_candidates_post ops newly
  - int syscommon_plugin_resourced_memory_lmk_get_kill_candidates_post(
  GArray *candidates)
    to consider user custom governor policy
  - int syscommon_plugin_resourced_memory_lmk_get_kill_candidates_post_with_wss(
  GArray *candidates)
    to consider working set size of app
  - int syscommon_plugin_resourced_memory_lmk_get_kill_candidates_post_with_foreground(
  GArray *candidates)
    to consider window information of app

Change-Id: I2a3c42635ce105f4400a68c8c382fb6548a11f8e
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
15 months agoplugin-api: resourced: Add window info into 'task_info' for LMK governor 94/294694/9
Unsung Lee [Thu, 22 Jun 2023 10:23:32 +0000 (19:23 +0900)]
plugin-api: resourced: Add window info into 'task_info' for LMK governor

Add window information list in 'task_info'.
Each window includes information such as visibility, focusing status,
and coordinate for LMK governor

resourced low memory killer (LMK) passes app information to LMK governor
during LMK process. Sometimes, LMK governor needs to know window information of
foreground app to prioritize which apps to be killed. This is because
foreground app(s) are visible status. If visible app(s) are killed by
LMK suddenly, then it embarrass the user.

Change-Id: I6b7b4ae00ca95534e7d99ec8b412909038d2fdc6
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
15 months agoplugin-api: deviced: Add syscommon_plugin_deviced_battery_is_possible_to_notify_batte... 08/296408/5 accepted/tizen/unified/20230731.175325
Yunhee Seo [Wed, 26 Jul 2023 11:00:04 +0000 (20:00 +0900)]
plugin-api: deviced: Add syscommon_plugin_deviced_battery_is_possible_to_notify_battery_full()

To use deviced plugin battery module, plugin backend battery module getter/setter are added.
And, new plugin module definition "SYSCOMMON_PLUGIN_MODULE_DEVICED_BATTERY" is added.
Also, to utilize plugin backend battery module function,
new battery interface header and source file was created.

To use plugin backend module, these are newly added.
- int syscommon_plugin_deviced_battery_get_backend(void);
- int syscommon_plugin_deviced_battery_put_backend(void);
- int syscommon_plugin_deviced_battery_is_possible_to_notify_battery_full(bool *possible_notify);
    -> This is used to determine whether to inform the fully charged or not.

* libsyscommon.spec typo was also corrected.

Change-Id: I30a76504cd27ab44000459080fb7cd0f72f42c92
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
15 months agoplugin-api: common: Add SYSCOMMON_PLUGIN_ABI_VERSION_TIZEN_8_0 25/296425/2
Yunhee Seo [Thu, 27 Jul 2023 07:43:24 +0000 (16:43 +0900)]
plugin-api: common: Add SYSCOMMON_PLUGIN_ABI_VERSION_TIZEN_8_0

As tizen 7.5 is replaced with 8.0, this definition should be added.

Change-Id: Ifa6a0a2107ff700672f26f68839c3ef9c08314f9
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
15 months agolibcommon: Add syscommon_mkdir() 70/296370/5
Youngjae Cho [Wed, 26 Jul 2023 07:34:36 +0000 (16:34 +0900)]
libcommon: Add syscommon_mkdir()

 It makes directory of the given path, including the whole intermediate
path if not exists. That is, it is equivalent to command 'mkdir -p'.
 It has come from the deviced as the function is eligible to being a
common function to be utilized by overall system libs/daemons.

Change-Id: Ifbf23c3fe721a149c54d6f650cce093dfb6f9e10
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
15 months agolibcommon: Add syscommon_file_copy() 55/296355/4
Youngjae Cho [Wed, 26 Jul 2023 05:34:11 +0000 (14:34 +0900)]
libcommon: Add syscommon_file_copy()

Change-Id: I00608e8a28b61026e19c1e73d4e0ed063c50379f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
15 months agolibcommon: Introduce notifier 59/296359/2
Youngjae Cho [Tue, 25 Jul 2023 11:21:10 +0000 (20:21 +0900)]
libcommon: Introduce notifier

 The libsyscommon notifer provides mean that communicate between
different modules. And it works based on publish-subscribe pattern.

 If someone wants to listen to an event, it subscribes to notify id
that is defined by event publisher, using subscribe function such as
 - syscommon_notifier_subscribe_notify_priority()
 - syscommon_notifier_subscribe_notify()
 - syscommon_notifier_subscribe_notify_udata_priority()
 - syscommon_notifier_subscribe_notify_udata()
Obviously, it is possible to unsubscribe notify via
 - syscommon_notifier_unsubscribe_notify()
 - syscommon_notifier_unsubscribe_notify_udata()

 If someone want publish a notify, it can be done by the functions
such as
 - syscommon_notifier_emit_notify()
 - syscommon_notifier_emit_notify_once()
See below for a detailed description about libsyscommon notifier.

 int syscommon_notifier_subscribe_notify_priority()
  - Subscribe notify without user_data callback.
  - Higher number of priority will be notified first.

 int syscommon_notifier_subscribe_notify()
  - Subscribe notify without user_data callback
  - Automatically assign default priority of 0.

 int syscommon_notifier_unsubscribe_notify()
  - Unsubscribe notify callback without user_data.

 int syscommon_notifier_subscribe_notify_udata_priority()
  - Subscribe notify with user_data callback.
  - Provide destroy callback to free user_data on unsubscribing.
  - Higher number of priority will be notified first.
  - Return notify id and can be used for unsubscribing.

 int syscommon_notifier_unsubscribe_notify_udata()
  - Subscribe notify with user_data callback
  - Provide destroy callback to free user_data on unsubscribing
  - Automatically assign default priority of 0.
  - Return notify id and can be used for unsubscribing.

 int syscommon_notifier_subscribe_notify_udata()
  - Unsubscribe notify callback with user_data.
  - Invoke destroy function with user_data.

 void syscommon_notifier_emit_notify()
  - Emit notify.

 void syscommon_notifier_emit_notify_once()
  - Emit notify only once.
  - Notification after the first one is ignored.

Change-Id: I1853f5a51e999c1f20b34c9281becb9cfbdb8a8b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Change-Id: Iff113c8869e27a90f11156181b500d25893387a8

15 months agolibcommon: Add syscommon_is_mounted() 64/296264/2 accepted/tizen/unified/20230726.163532
Youngjae Cho [Mon, 24 Jul 2023 11:46:52 +0000 (20:46 +0900)]
libcommon: Add syscommon_is_mounted()

syscmmon_is_mounted() checks whether the given path exists in /etc/mtab.

Change-Id: I994c4190a069330403e5eb516eb6fef7f5d5404f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
15 months agoReplace prefix 'libsys' with 'syscommon' 63/296263/1
Youngjae Cho [Mon, 24 Jul 2023 11:25:11 +0000 (20:25 +0900)]
Replace prefix 'libsys' with 'syscommon'

Change-Id: Ibe92ea978eb95b6a2f470dae7195b2840dd7c2d5
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
15 months agoproc: Add proc operation 90/295990/4
Youngjae Cho [Mon, 17 Jul 2023 06:18:40 +0000 (15:18 +0900)]
proc: Add proc operation

These have come from the deviced.
 - int syscommon_proc_get_comm(pid_t pid, char *buf, int len);
 - int syscommon_proc_get_cmdline(pid_t pid, char *buf, int len);
 - int syscommon_proc_get_attr_current(pid_t pid, char *buf, int len);
 - int syscommon_proc_is_app(pid_t pid);

Change-Id: I89b668ed045db9c666e1921bceaf8a70c112af78
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
15 months agoAdd include directory to collect header file 90/295890/1 accepted/tizen/unified/20230718.162146 accepted/tizen/unified/dev/20230726.120020 accepted/tizen/unified/riscv/20230718.003634
Youngjae Cho [Mon, 17 Jul 2023 02:13:49 +0000 (11:13 +0900)]
Add include directory to collect header file

It is collected and installed automatically just by creating header
file in include directory.

Change-Id: Ia411edd7101afbb49097229986965eff5b175519
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
15 months agolibcommon: Add missing source/header for CMake 87/295887/1
Youngjae Cho [Mon, 17 Jul 2023 01:22:12 +0000 (10:22 +0900)]
libcommon: Add missing source/header for CMake

Change-Id: Ifc3d782a610cd6dfddcdc66037ea680ca9aca8da
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
15 months agoAdd functions that use a private connection. 11/295611/2
Mateusz Moscicki [Mon, 10 Jul 2023 14:34:25 +0000 (16:34 +0200)]
Add functions that use a private connection.

At the moment only the functions that libstorage uses are prepared.
Currently only functoins are added that are called by libstorage during
the dotnet-launcher preparation.

Change-Id: Idd7f145d1fef057cb5ba42039d006b491f5d7166

15 months agolibcommon: Introduce bitmap 94/295694/2
Youngjae Cho [Wed, 12 Jul 2023 10:05:44 +0000 (19:05 +0900)]
libcommon: Introduce bitmap

These have come from the deviced.

Change-Id: I8d5eb95703d32d8fd17054c4446378adb4db97b2
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
16 months agoRevert "Allow to change the default connection type to private" 11/294911/1 accepted/tizen/unified/20230703.093326
Mateusz Moscicki [Wed, 28 Jun 2023 13:59:03 +0000 (15:59 +0200)]
Revert "Allow to change the default connection type to private"

This reverts commit 81ca03541a0b4c72570b65875ce03c6be86e753b.

Change-Id: I871cf09f17724070d7e4c437d4638e87c33a5eae

16 months agoAllow to change the default connection type to private 17/294517/5 accepted/tizen/unified/20230626.043754
Mateusz Moscicki [Tue, 20 Jun 2023 11:15:22 +0000 (13:15 +0200)]
Allow to change the default connection type to private

This is used to ensure that applications launched by launchpad get their
own connection with the appropriate label, rather than using the
connection that was established before the label change.

Change-Id: Id1a6c80638c762f3de8856410b562df653dd70b5

16 months agoRemove the unnecessary dependencies and fix pc file 41/292341/5 accepted/tizen/unified/20230613.170800
wchang kim [Thu, 4 May 2023 08:35:13 +0000 (17:35 +0900)]
Remove the unnecessary dependencies and fix pc file

If it have to make the dependency with specific packages
at install time of rpm package , 'Requires' keyword should be used.

But, development packages are only used when building the packages
and they are not needed to be included in the image like rootfs.img.

In result, remove the unnecessary dependencies and fix pc file
from platform image.

Change-Id: Ic14f2ab2bbe5134bedd948618c1aeee1e6d2d0fb
Signed-off-by: wchang kim <wchang.kim@samsung.com>
[cw00.choi: Update patch title and add description]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
16 months agoplugin-api: Fix the name of backend .so files 08/293908/1 accepted/tizen/unified/20230608.164354
SangYoun Kwak [Thu, 8 Jun 2023 02:10:22 +0000 (11:10 +0900)]
plugin-api: Fix the name of backend .so files

The name for plugin backend .so files changed:
    libplugin-resourced-memory-lmk.so
    -> libplugin-backend-resourced-memory-lmk.so
Since there are other packages start with "system-plugin", it is
necessary to show that it is a backend for system-plugin.

Change-Id: I5b11cfc6c1cdf39a3b60758d8bc2c075ac348ce9
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
18 months agoplugin-api: Add manifest to plugin-api packages 56/292156/1 accepted/tizen/unified/20230607.160247
SangYoun Kwak [Fri, 28 Apr 2023 04:55:10 +0000 (13:55 +0900)]
plugin-api: Add manifest to plugin-api packages

Previously, the smack label("_") was added by 'chsmack' command.
By adding '%manifest' in the '%file' section, smack label can be applied
to files without using chsmack in the '%post' section.

Change-Id: Icd91b04e46d0eeb4182454aada7705ff0952c8fb
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
18 months agoplugin-api: Rename 'plugin' to 'syscommon-plugin' 81/292081/3
SangYoun Kwak [Thu, 27 Apr 2023 05:13:39 +0000 (14:13 +0900)]
plugin-api: Rename 'plugin' to 'syscommon-plugin'

Since the plugin-api is the plugin feature which is only used in system
scope and it is located in libsyscommon, plugin was changed to
syscommon-plugin to indicate its usage and location.

Change rule:
 * Basically, plugin becomes syscommon-plugin to indicate it is from
   the libsyscommon repository
 * Symbols which are used internally can omit the prefix 'syscommon'.

Changed:
 * Package name: plugin-api... -> libsyscommon-plugin-api...
 * Package config file name:
      plugin-api-....pc -> libsyscommon-plugin-api....pc
 * .so name: libplugin-api-....so -> libsyscommon-plugin-api....so

Change-Id: Ia56c935ebf97a93cad7efd0235508c540ee0348d
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
19 months agoplugin-api: Fix the prefix for pkg_check_modules of CMakeLists.txt 95/289995/3
SangYoun Kwak [Thu, 16 Mar 2023 11:45:18 +0000 (20:45 +0900)]
plugin-api: Fix the prefix for pkg_check_modules of CMakeLists.txt

The command pkg_check_modules in CMakeLists.txt checks modules and sets
variables about these modules.
The names of these variables have their prefix designated by the command
pkg_check_modules like below:
pkg_check_modules(<prefix> REQUIRED <modules>)

Previously, in plugin-api-common, prefix was "pkgs", which is not a
unique name.
In plugin-api-resourced, prefix was ${PROJECT_NAME} but when calling
variables, "pkgs" was used for prefix, which is not correct usage.
This fault was fixed by replacing their prefix as their ${PROJECT_NAME}.

Change-Id: Ide1db4b707f2c6e9f632c0cc36ab4ec654383887
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
19 months agoplugin-api: deviced: Add plugin-api-deviced 94/289994/3 accepted/tizen/unified/20230320.164216 accepted/tizen/unified/20230321.035424
Youngjae Cho [Fri, 17 Mar 2023 00:57:59 +0000 (09:57 +0900)]
plugin-api: deviced: Add plugin-api-deviced

Initialize plugin-api for deviced. It creates package plugin-api-deviced
and the package contains empty library.

Change-Id: I2a91b9185e4b9f0ffbe61c4d71801d20a15b0df2
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
19 months agopackaging: Rearrange %package directive 90/289990/3
Youngjae Cho [Fri, 17 Mar 2023 00:40:27 +0000 (09:40 +0900)]
packaging: Rearrange %package directive

As those relocated %packages overwrite the %{version} of libsyscommon,
define %{libsyscommon_version} to maintain its value.

Change-Id: I0049a45fdd343515e09c97a4abf0f8aa6ea9704a
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
19 months agoresource-manager: cleanup resource instance correctly 47/289947/2 accepted/tizen/unified/20230317.081018
Youngjae Cho [Thu, 16 Mar 2023 04:07:42 +0000 (13:07 +0900)]
resource-manager: cleanup resource instance correctly

On failure during create_resource(), remove resource instance from
hashtable if it has been registered hashtable via add_resource().

Change-Id: I124add4633b06be0e3a2bc2786f1eee8b69acce0
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
19 months agoRevert "resource-manager: Relocate add_resource() in create_resource()" 46/289946/1
Youngjae Cho [Thu, 16 Mar 2023 03:54:51 +0000 (12:54 +0900)]
Revert "resource-manager: Relocate add_resource() in create_resource()"

This reverts commit 5880b22f3e55b60c7b9326c51012b95f05416145.

The resource instance must be added to hashtable prior to the operation
driver->ops.create(resource->id). As this operation passes resource id,
it is possible that the operation work based on that resource id, which
denotes resource instance and must have been registered to hashtable.
Therefore, add_resource() must be followed by driver->ops.create().

Change-Id: I05b8a9f85741313c14201501fe6bbc4a5b8c7233
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
19 months agoini-parser: Fix size_t to ssize_t 97/288797/7
TaeminYeom [Thu, 23 Feb 2023 07:51:13 +0000 (16:51 +0900)]
ini-parser: Fix size_t to ssize_t

Variable "n_read" brings the return of getline,
but return type of getline is ssize_t.
Also, fseek's second parameter is long type,
so it is proper to use signed data type.

Change-Id: I87f01a986a9b7fa68d7a675a1e31a0afe0c1f4bf
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
19 months agoplugin-api: resourced: Add plugin-api-resourced 78/287978/23 accepted/tizen/unified/20230310.062652
SangYoun Kwak [Wed, 8 Feb 2023 10:59:30 +0000 (19:59 +0900)]
plugin-api: resourced: Add plugin-api-resourced

This plugin api provides functions for resourced.
Provided functions:
 * plugin_resourced_low_memory_killer_get_backend: get backend library
 * plugin_resourced_low_memory_killer_put_backend: put backend library
 * plugin_resourced_low_memory_killer_get_kill_candidates: choose kill
   candidates from procs/apps list.

The files newly created during build due to this patch are as follows:
(arch=armv7l)

plugin-api-resourced-0.1.0-0.armv7l.rpm
 * /usr/lib: libplugin-api-resourced.so.0 -> libplugin-api-resourced.so.0.1.0
 * /usr/lib: libplugin-api-resourced.so.0.1.0
 * /usr/share/licenses/plugin-api/resourced: LICENSE.MIT

plugin-api-resourced-debuginfo-0.1.0-0.armv7l.rpm
 * /usr/lib/debug/usr/lib/libplugin-api-resourced.so.0.1.0.debug

libsyscommon-debugsource-5.0.0-0.armv7l.rpm
 * /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/resourced/include: plugin-resourced-memory-lmk-interface.h
 * /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/resourced/src: plugin-resourced-memory-lmk.c

plugin-api-resourced-devel-0.1.0-0.armv7l.rpm
 * /usr/include/plugin: plugin-resourced-memory-lmk.h
 * /usr/include/plugin: plugin-resourced-memory-lmk-interface.h
 * /usr/lib: libplugin-api-resourced.so -> libplugin-api-resourced.so.0
 * /usr/lib/pkgconfig: plugin-api-resourced.pc
 * /usr/share/licenses/plugin-api/resourced: LICENSE.MIT

Change-Id: I3f9c2deac1220131df5bb8a3db502b40dc1bdd72
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
19 months agoplugin-api: common: Add plugin-api-common 56/287856/26
SangYoun Kwak [Tue, 7 Feb 2023 06:53:24 +0000 (15:53 +0900)]
plugin-api: common: Add plugin-api-common

plugin-api was added to provide plugin feature.
Plugin separates target-specific code to plugin-backend
from common Tizen codes such as deviced or resourced.
The structure of plugin-api is based on the hal-api.

The files newly created during build due to this patch are as follows:
(arch=armv7l)

plugin-api-common-0.1.0-0.armv7l.rpm
 * /usr/lib/: libplugin-api-common.so.0 -> libplugin-api-common.so.0.1.0
 * /usr/lib/: libplugin-api-common.so.0.1.0
 * /usr/share/licenses/plugin-api-common: LICENSE.MIT

plugin-api-common-debuginfo-0.1.0-0.armv7l
 * /usr/lib/debug/usr/lib: libplugin-api-common.so.0.1.0.debug

libsyscommon-debugsource-5.0.0-0.armv7l.rpm
 * /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/common/include: plugin-common.h
 * /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/common/include: plugin-common-interface.h
 * /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/common/src: plugin-api-list.h
 * /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/common/src: plugin-api-conf.c
 * /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/common/src: plugin-api-conf.h
 * /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/common/src: common.h
 * /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/common/src: plugin-api-common.c

plugin-api-common-devel-0.1.0-0.armv7l
 * /usr/include/plugin: plugin-common.h
 * /usr/include/plugin: plugin-common-interface.h
 * /usr/lib/: libplugin-api-common.so -> libplugin-api-common.so.0
 * /usr/lib/pkgconfig/plugin-api-common.pc
 * /usr/share/licenses/plugin-api-common: LICENSE.MIT

Change-Id: I3c0b385d7bd76b82db8db73beb189b78009b8774
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
19 months agoresource-manager: Relocate add_resource() in create_resource() 94/289494/3
Youngjae Cho [Thu, 9 Mar 2023 00:23:06 +0000 (09:23 +0900)]
resource-manager: Relocate add_resource() in create_resource()

If operations following the add_resource() fail, then it is necessary
to cleanup resource instance from hashtable that has been added by
add_resource(). Instead of impelementing cleanup, move add_resource()
to the end of create_resource() so that nothing follow add_resource().

Change-Id: I705a3dc3487c8ebf9e80cff51b7e89069a6a4f1a
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
19 months agoresource-manager: Introduce attribute setter 82/288382/6
Youngjae Cho [Thu, 16 Feb 2023 04:44:03 +0000 (13:44 +0900)]
resource-manager: Introduce attribute setter

The setter is only allowed for resource type of INSTANCE_TYPE_NORMAL.
- syscommon_resman_set_resource_attr_int()
- syscommon_resman_set_resource_attr_int64()
- syscommon_resman_set_resource_attr_uint()
- syscommon_resman_set_resource_attr_uint64()
- syscommon_resman_set_resource_attr_double()
- syscommon_resman_set_resource_attr_string()
- syscommon_resman_set_resource_attr_array()
- syscommon_resman_set_resource_attr_ptr()

Change-Id: I0e30425c35ec6df9660ef3c57a5ecd6a5769e1dd
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
19 months agoresource-manager: Add get API for INSTANCE_TYPE_NORMAL 33/288333/15
Youngjae Cho [Wed, 15 Feb 2023 08:37:17 +0000 (17:37 +0900)]
resource-manager: Add get API for INSTANCE_TYPE_NORMAL

Resource instance type of INSTANCE_TYPE_NORMAL fetches its attribute
value by calling attribute_ops.get().
 - syscommon_resman_get_resource_attr_int()
 - syscommon_resman_get_resource_attr_int64()
 - syscommon_resman_get_resource_attr_uint()
 - syscommon_resman_get_resource_attr_uint64()
 - syscommon_resman_get_resource_attr_double()
 - syscommon_resman_get_resource_attr_string()
 - syscommon_resman_get_resource_attr_array()
 - syscommon_resman_get_resource_attr_ptr()

Change-Id: Ib3482ff685b0c3e4783cd8a3ce7dc5e6ab1e9699
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
19 months agoresource-manager: Make monitor API be exclusive for INSTANCE_TYPE_MONITOR 66/288666/10
Youngjae Cho [Tue, 21 Feb 2023 08:06:22 +0000 (17:06 +0900)]
resource-manager: Make monitor API be exclusive for INSTANCE_TYPE_MONITOR

The APIs for monitor instance has changed to return error when it is
used on instance type other than INSTANCE_TYPE_MONITOR.

Change-Id: Ifa1ce8924e60cb3a08ab467bf6f112421bd0abb7
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
19 months agoresource-manager: Reimplement attribute_ops 64/288664/11
Youngjae Cho [Tue, 21 Feb 2023 03:10:00 +0000 (12:10 +0900)]
resource-manager: Reimplement attribute_ops

attribute_ops is in charge of operations for resource instance type
of INSTANCE_TYPE_NORMAL. As the is_resource_attr_supported() works
based on instance type, API for NORMAL instance has been added.
 - syscommon_resman_is_resource_attr_supported()

Change-Id: Ia9078f9d4639f6ce3812a4749aaf0ada87af22f2
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
19 months agoresource-manager: Introduce resource instance type 46/288646/10
Youngjae Cho [Tue, 21 Feb 2023 01:41:58 +0000 (10:41 +0900)]
resource-manager: Introduce resource instance type

 To clearly partition the way how resource works, added instance_type
to resource, INSTANCE_TYPE_NORMAL and INSTANCE_TYPE_MONITOR. Resource
instance of each type can be created by the below functions:
  - INSTANCE_TYPE_NORMAL: syscommon_resman_create_resource()
  - INSTANCE_TYPE_MONITOR: syscommon_resman_monitor_create_resource()

 Instance type of NORMAL sets all interest bits by default. Therefore,
it doesn't need to set interest bit additionally. On the other hand,
instance type of MONITOR clears all interest bits by default. Therefore,
it should set bit manually in which a monitor interest before it starts
monitoring.
 In addition, instance type of NORMAL always invoke its attribute
getter for every access to attribute value. That is, it always fetches
the latest value. On the other hand, instance type of MONITOR fetches
attribute value on a specific time that must have been synchronized by
syscommon_resman_monitor_update_resource_attrs().

Change-Id: I39b2089a21d5b5d7b59704a7835e2646939a20c2
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
20 months agoresource-manager: Change variable name 45/288645/2
Youngjae Cho [Tue, 21 Feb 2023 01:25:29 +0000 (10:25 +0900)]
resource-manager: Change variable name

There will be another type, instance_type, which denotes how an resource
instance operates. To clearly distinguish role of those variables, change
variable name type to resource_type.

Change-Id: I2b5dd012d86cc7869da7206feea4ffad7f1dd8c3
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
20 months agoresource-manager: Fix license Apache to MIT 85/288785/1 accepted/tizen/unified/20230306.172221
TaeminYeom [Thu, 23 Feb 2023 04:48:29 +0000 (13:48 +0900)]
resource-manager: Fix license Apache to MIT

libsyscommon project is under the MIT license,
but newly added files were marked with Apache licenses.

[Changed file]
src/resource-manager/resource-device.c
src/resource-manager/resource-device.h
src/resource-manager/resource-listener-epoll.c
src/resource-manager/resource-listener.h
src/resource-manager/resource-manager.c
src/resource-manager/resource-manager.h
src/resource-manager/resource-type.h

Change-Id: I922df053003b2d1924543fd26690f7dd58069c42
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
20 months agoresource-manager: Rename existing ops to monitor_ops 96/288496/2
Dongwoo Lee [Fri, 17 Feb 2023 05:43:08 +0000 (14:43 +0900)]
resource-manager: Rename existing ops to monitor_ops

Change-Id: I2d5e1228052a24c52831a1ac64b6e8c9a6394617
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
20 months agoRevert "resource-manager: introduce sync getter" 95/288495/2
Dongwoo Lee [Fri, 17 Feb 2023 02:59:48 +0000 (11:59 +0900)]
Revert "resource-manager: introduce sync getter"

Since non-sync getter for monitoring is moved into monitor_ops, sync
suffix for normal getter/setter is no more needed. Thus, this reverts
commit ad9493c0b5ae ("resource-manager: introduce sync getter").

Change-Id: I667899fc5254fa3777ffa5d784f062a3fa9e28c5
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
20 months agoresource-manager: reduce repetitive code 01/288301/2
Youngjae Cho [Wed, 15 Feb 2023 02:03:12 +0000 (11:03 +0900)]
resource-manager: reduce repetitive code

Change-Id: I374f930323e3f85550251d015e4f9c320b554d1f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
20 months agoresource-manager: Add epoll type listener support 79/287479/6 accepted/tizen/unified/20230221.031433
Dongwoo Lee [Thu, 12 Jan 2023 01:01:22 +0000 (10:01 +0900)]
resource-manager: Add epoll type listener support

To support ease of use for epoll type listener, this introduces
following APIs:
 - syscommon_resman_register_epoll_listener: register fd to epoll
   listener worker thread and returns listener handle id.
 - syscommon_resman_unregister_epoll_listener: unregister fd from
   worker for the correspongding handle id. (fd is not closed by this
   function, so caller resource driver should be close fd by its own
   responsibility.

Change-Id: Ide38a3816742939c9101e5a92944f8dc2480ff8f
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
20 months agoresource-manager: Introduce attribute listener operations 78/287478/4
Dongwoo Lee [Thu, 12 Jan 2023 01:01:22 +0000 (10:01 +0900)]
resource-manager: Introduce attribute listener operations

Now each attribute can have 'listener_ops' which consists 'init',
'exit', and 'action', to watch changes for underlying state. Each
operation has a role as below:

 - init: allocate resources and register listeners
 - exit: deallocate resources and unregister listeners
 - action: change attribute values as following listener parameters

'init'/'exit' is called automatically when each attribute interest is
set/unset each, on the other hand, 'action' should be called by each
listener.

Change-Id: I076f41f751b18f4c39d7548e4d78ddc02e8e26a2
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
20 months agoresource-manager: revamp init/exit of resource driver 10/288010/1
Youngjae Cho [Thu, 9 Feb 2023 04:39:57 +0000 (13:39 +0900)]
resource-manager: revamp init/exit of resource driver

Change-Id: I24bf3bd1b93bbe53c170522bc039b082191989de
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
20 months agolibgdbus: add dbus signal for power lock state change 81/287781/2 accepted/tizen/unified/20230209.111304
Yunhee Seo [Mon, 6 Feb 2023 05:42:42 +0000 (14:42 +0900)]
libgdbus: add dbus signal for power lock state change

In this context, power lock state is meaning of "locked or unlocked".
Thus, If the power lock state of specific pmlock is changed,
this signal will be used.

Change-Id: I9db5527bf9668fe54ee9c0c19a2be23b42f91517
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
20 months agoresource-manager: allocate resource id correctly 95/287795/2
Youngjae Cho [Mon, 6 Feb 2023 10:05:08 +0000 (19:05 +0900)]
resource-manager: allocate resource id correctly

It hasn't cleared sign bit on allocating resource id. Fix it to clear
sign bit correctly.

Change-Id: Ic429dd26bcd6082ed434aecf98b8a48eb0b52b47
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>