[Tizen.System.Resource] Update the description of APIs
authorUnsung Lee <unsung.lee@samsung.com>
Tue, 24 Sep 2024 05:10:56 +0000 (14:10 +0900)
committerChanwoo Choi <chanwoo@kernel.org>
Mon, 30 Sep 2024 05:30:51 +0000 (14:30 +0900)
Update the description of Tizen.System.Resource APIs

Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
src/Tizen.System.Resource/Resource/Resource.cs

index 8d4063b6bd1bb829e9a6667c7b9bb2ab40e848c1..99700d1c56b7fa72d4fe089e07ba2d747cf3e015 100644 (file)
@@ -25,16 +25,27 @@ namespace Tizen.System
        [EditorBrowsable(EditorBrowsableState.Never)]
        public class Resource
        {
-        /// <summary>
-               /// Set cpu boosting for the target process (pid/tids).
-        /// </summary>
-               /// <privilege>
-               /// http://tizen.org/privilege/internal/default/partner
-               /// </privilege>
-               /// <param name="pid">The target process pid/tids.</param>
-               /// <param name="level">The cpu boosting level</param>
-               /// <param name="flags">The cpu boosting flag bits</param>
-               /// <param name="timeoutMsec">The timeout in milliseconds</param>
+                /// <summary>
+                /// Sets cpu boosting for the target process (pid/tids) to the desired level for as long as required.
+                /// </summary>
+                /// <remarks>
+                /// An internal API, so it can be used only by partner level developers. 
+                /// In addition, the developers cannot arbitrary choose whether to enforce this privilege or not.
+                /// </remarks>
+                /// <privilege>
+                /// http://tizen.org/privilege/internal/default/partner
+                /// </privilege>
+                /// <param name="pid">The target process pid/tids.</param>
+                /// <param name="level">The cpu boosting level</param>
+                /// <param name="flags">The cpu boosting flag bits</param>
+                /// <param name="timeoutMsec">The timeout in milliseconds</param>
+                /// <seealso cref="ResourceClearCpuBoosting(ResourcePidInfo)"/>
+                /// <seealso cref="ResourceGetCpuBoostingLevel(ResourcePidInfo, CpuBoostingLevelInfo)"/>
+                /// <example>
+                /// <code>
+                /// Resource.ResourceSetCpuBoosting(new ResourcePidInfo() { Pid = processInfo.Id }, CpuBoostingLevel.CpuBoostingLevelStrong, 0, -1);
+                /// </code>
+                /// </example>
                [EditorBrowsable(EditorBrowsableState.Never)]
                public static void ResourceSetCpuBoosting (ResourcePidInfo pid, CpuBoostingLevel level, CpuBoostingFlag flags, int timeoutMsec)
                {
@@ -45,13 +56,24 @@ namespace Tizen.System
                        }
                }
 
-               /// <summary>
-               /// Clear cpu boosting for the boosted process (pid/tids).
-        /// </summary>
-               /// <privilege>
-               /// http://tizen.org/privilege/internal/default/partner
-               /// </privilege>
-               /// <param name="pid">The target process pid/tids.</param>
+                /// <summary>
+                /// Clears cpu boosting for the boosted process (pid/tids).
+                /// </summary>
+                /// <remarks>
+                /// An internal API, so it can be used only by partner level developers. 
+                /// In addition, the developers cannot arbitrary choose whether to enforce this privilege or not.
+                /// </remarks>
+                /// <privilege>
+                /// http://tizen.org/privilege/internal/default/partner
+                /// </privilege>
+                /// <param name="pid">The target process pid/tids.</param>
+                /// <seealso cref="ResourceSetCpuBoosting(ResourcePidInfo, CpuBoostingLevel, CpuBoostingFlag, int)"/>
+                /// <seealso cref="ResourceGetCpuBoostingLevel(ResourcePidInfo, CpuBoostingLevelInfo)"/>
+                /// <example>
+                /// <code>
+                /// Resource.ResourceClearCpuBoosting(new ResourcePidInfo() { Pid = processInfo.Id });
+                /// </code>
+                /// </example>
                [EditorBrowsable(EditorBrowsableState.Never)]
                public static void ResourceClearCpuBoosting (ResourcePidInfo pid)
                {
@@ -62,14 +84,26 @@ namespace Tizen.System
                        }
                }
 
-               /// <summary>
-               /// Get the cpu boosting level for the target process (pid/tids).
-        /// </summary>
-               /// <privilege>
-               /// http://tizen.org/privilege/internal/default/partner
-               /// </privilege>
-               /// <param name="pid">The target process pid/tids.</param>
-               /// <param name="level">The boosting level for the target process (pid/tids).</param>
+                /// <summary>
+                /// Gets the cpu boosting level for the target process (pid/tids).
+                /// </summary>
+                /// <remarks>
+                /// An internal API, so it can be used only by partner level developers. 
+                /// In addition, the developers cannot arbitrary choose whether to enforce this privilege or not.
+                /// </remarks>
+                /// <privilege>
+                /// http://tizen.org/privilege/internal/default/partner
+                /// </privilege>
+                /// <param name="pid">The target process pid/tids.</param>
+                /// <param name="level">The boosting level for the target process (pid/tids).</param>
+                /// <seealso cref="ResourceSetCpuBoosting(ResourcePidInfo, CpuBoostingLevel, CpuBoostingFlag, int)"/>
+                /// <seealso cref="ResourceClearCpuBoosting(ResourcePidInfo)"/>
+                /// <example>
+                /// <code>
+                /// CpuBoostingLevelInfo level = new CpuBoostingLevelInfo();
+                /// Resource.ResourceGetCpuBoostingLevel(new ResourcePidInfo() { Pid = processInfo.Id }, out level);
+                /// </code>
+                /// </example>
                [EditorBrowsable(EditorBrowsableState.Never)]
                public static void ResourceGetCpuBoostingLevel (ResourcePidInfo pid, out CpuBoostingLevelInfo level)
                {
@@ -85,15 +119,28 @@ namespace Tizen.System
                        }
                }
 
-               /// <summary>
-               /// Set cpu resource inheritance from the source tid to the destination process (pid/tids).
-        /// </summary>
-               /// <privilege>
-               /// http://tizen.org/privilege/internal/default/partner
-               /// </privilege>
-               /// <param name="sourceTid">The caller thread tid.</param>
-               /// <param name="destProcess">The name of destination process.</param>
-               /// <param name="timeoutMsec">The timeout in milliceconds.</param>
+                /// <summary>
+                /// Sets cpu resource inheritance from the source tid to the destination process (pid/tids).
+                /// </summary>
+                /// <remarks>
+                /// An internal API, so it can be used only by partner level developers. 
+                /// In addition, the developers cannot arbitrary choose whether to enforce this privilege or not.
+                /// It should be called from source after calling the resource_register_cpu_inheritance_destination() function in the destination.
+                /// </remarks>
+                /// <privilege>
+                /// http://tizen.org/privilege/internal/default/partner
+                /// </privilege>
+                /// <param name="sourceTid">The caller thread tid.</param>
+                /// <param name="destProcess">The name of destination process.</param>
+                /// <param name="timeoutMsec">The timeout in milliceconds.</param>
+                /// <seealso cref="ResourceClearCpuInheritance(int, string)"/>
+                /// <seealso cref="ResourceRegisterCpuInheritanceDestination(string, ResourcePidInfo)"/>
+                /// <seealso cref="ResourceUnregisterCpuInheritanceDestination(string)"/>
+                /// <example>
+                /// <code>
+                /// Resource.ResourceSetCpuInheritance(0, "test-destination", 500);
+                /// </code>
+                /// </example>
                [EditorBrowsable(EditorBrowsableState.Never)]
                public static void ResourceSetCpuInheritance (int sourceTid, string destProcess, int timeoutMsec)
                {
@@ -104,14 +151,27 @@ namespace Tizen.System
                        }
                }
 
-               /// <summary>
-               /// Clear cpu resource inheritance from the source tid to the destination process (pid/tids).
-        /// </summary>
-               /// <privilege>
-               /// http://tizen.org/privilege/internal/default/partner
-               /// </privilege>
-               /// <param name="sourceTid">The caller thread tid.</param>
-               /// <param name="destProcess">The name of destination process.</param>
+                /// <summary>
+                /// Clears cpu resource inheritance from the source tid to the destination process (pid/tids).
+                /// </summary>
+                /// <remarks>
+                /// An internal API, so it can be used only by partner level developers. 
+                /// In addition, the developers cannot arbitrary choose whether to enforce this privilege or not.
+                /// It should be called from source after calling the resource_register_cpu_inheritance_destination() function in the destination.
+                /// </remarks>
+                /// <privilege>
+                /// http://tizen.org/privilege/internal/default/partner
+                /// </privilege>
+                /// <param name="sourceTid">The caller thread tid.</param>
+                /// <param name="destProcess">The name of destination process.</param>
+                /// <seealso cref="ResourceSetCpuInheritance(int, string, int)"/>
+                /// <seealso cref="ResourceRegisterCpuInheritanceDestination(string, ResourcePidInfo)"/>
+                /// <seealso cref="ResourceUnregisterCpuInheritanceDestination(string)"/>
+                /// <example>
+                /// <code>
+                /// Resource.ResourceClearCpuInheritance(0, "test-destination");
+                /// </code>
+                /// </example>
                [EditorBrowsable(EditorBrowsableState.Never)]
                public static void ResourceClearCpuInheritance (int sourceTid, string destProcess)
                {
@@ -122,14 +182,26 @@ namespace Tizen.System
                        }
                }
 
-               /// <summary>
-               /// Register a destination process (pid/tids) for cpu resource inheritance.
-        /// </summary>
-               /// <privilege>
-               /// http://tizen.org/privilege/internal/default/partner
-               /// </privilege>
-               /// <param name="destProcess">The name of destination process.</param>
-               /// <param name="pid">The destination process pid/tids.</param>
+                /// <summary>
+                /// Registers a destination process (pid/tids) for cpu resource inheritance.
+                /// </summary>
+                /// <remarks>
+                /// An internal API, so it can be used only by partner level developers. 
+                /// In addition, the developers cannot arbitrary choose whether to enforce this privilege or not.
+                /// </remarks>
+                /// <privilege>
+                /// http://tizen.org/privilege/internal/default/partner
+                /// </privilege>
+                /// <param name="destProcess">The name of destination process.</param>
+                /// <param name="pid">The destination process pid/tids.</param>
+                /// <seealso cref="ResourceSetCpuInheritance(int, string, int)"/>
+                /// <seealso cref="ResourceClearCpuInheritance(int, string)"/>
+                /// <seealso cref="ResourceUnregisterCpuInheritanceDestination(string)"/>
+                /// <example>
+                /// <code>
+                /// Resource.ResourceRegisterCpuInheritanceDestination("test-destination", new ResourcePidInfo() { Pid = processInfo.Id });
+                /// </code>
+                /// </example>
                [EditorBrowsable(EditorBrowsableState.Never)]
                public static void ResourceRegisterCpuInheritanceDestination (string destProcess, ResourcePidInfo pid)
                {
@@ -140,13 +212,25 @@ namespace Tizen.System
                        }
                }
 
-               /// <summary>
-               /// Unregister a destination process (pid/tids) for cpu resource inheritance.
-        /// </summary>
-               /// <privilege>
-               /// http://tizen.org/privilege/internal/default/partner
-               /// </privilege>
-               /// <param name="destProcess">The name of destination process.</param>
+                /// <summary>
+                /// Unregisters a destination process (pid/tids) for cpu resource inheritance.
+                /// </summary>
+                /// <remarks>
+                /// An internal API, so it can be used only by partner level developers. 
+                /// In addition, the developers cannot arbitrary choose whether to enforce this privilege or not.
+                /// </remarks>
+                /// <privilege>
+                /// http://tizen.org/privilege/internal/default/partner
+                /// </privilege>
+                /// <param name="destProcess">The name of destination process.</param>
+                /// <seealso cref="ResourceSetCpuInheritance(int, string, int)"/>
+                /// <seealso cref="ResourceClearCpuInheritance(int, string)"/>
+                /// <seealso cref="ResourceRegisterCpuInheritanceDestination(string, ResourcePidInfo)"/>
+                /// <example>
+                /// <code>
+                /// Resource.ResourceUnregisterCpuInheritanceDestination("test-destination");
+                /// </code>
+                /// </example>
                [EditorBrowsable(EditorBrowsableState.Never)]
                public static void ResourceUnregisterCpuInheritanceDestination (string destProcess)
                {