!166 BeginRead 的时候方法缺少注释

Merge pull request !166 from 周梦杰/0918
This commit is contained in:
openharmony_ci 2024-09-19 06:43:48 +00:00 committed by Gitee
commit d4cb661839
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 38 additions and 2 deletions

View File

@ -39,6 +39,15 @@ public:
* While return true if content recover success.
* OS cannot reclaim the memory of the obj's content when this
* function return true, until EndRead() is called.
*
* Attension: the return value must be recevied and handled,
* since the visiting of this object with the failure result
* will cause unsuspected result.
* For example:
* if (BeginRead()) {
* // visit this object
* EndRead();
* }
*/
bool BeginRead();
@ -50,13 +59,22 @@ public:
void EndRead();
/*
* BeginRead: begin read the PurgeableMem obj.
* BeginRead: begin write the PurgeableMem obj.
* Return: return true if the obj's content is present.
* If content is purged(no present), system will recover its data,
* return false if content is purged and recover failed.
* While return true if content recover success.
* OS cannot reclaim the memory of the obj's content when this
* function return true, until EndRead() is called.
* function return true, until EndWrite() is called.
*
* Attension: the return value must be recevied and handled,
* since the visiting of this object with the failure result
* will cause unsuspected result.
* For example:
* if (BeginWrite()) {
* // visit this object
* EndWrite();
* }
*/
bool BeginWrite();

View File

@ -108,6 +108,15 @@ bool OH_PurgeableMemory_Destroy(OH_PurgeableMemory *purgObj);
* OS cannot reclaim the memory of @purgObj's content when this
* function return true, until PurgMemEndRead() is called.
*
* Attension: the return value must be recevied and handled,
* since the visiting of this object with the failure result
* will cause unsuspected result.
* For example:
* if (OH_PurgeableMemory_BeginRead()) {
* // visit this object
* OH_PurgeableMemory_EndRead();
* }
*
* @since 10
* @version 1.0
*/
@ -138,6 +147,15 @@ void OH_PurgeableMemory_EndRead(OH_PurgeableMemory *purgObj);
* OS cannot reclaim the memory of @purgObj's content when this
* function return true, until PurgMemEndWrite() is called.
*
* Attension: the return value must be recevied and handled,
* since the visiting of this object with the failure result
* will cause unsuspected result.
* For example:
* if (OH_PurgeableMemory_BeginWrite()) {
* // visit this object
* OH_PurgeableMemory_EndWrite();
* }
*
* @since 10
* @version 1.0
*/