diff mbox

odp_shared_memory.h: add doxygen in/out

Message ID 1415381238-42124-1-git-send-email-mike.holmes@linaro.org
State Rejected
Headers show

Commit Message

Mike Holmes Nov. 7, 2014, 5:27 p.m. UTC
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 .../linux-generic/include/api/odp_shared_memory.h   | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

Comments

Bill Fischofer Nov. 7, 2014, 5:40 p.m. UTC | #1
On Fri, Nov 7, 2014 at 11:27 AM, Mike Holmes <mike.holmes@linaro.org> wrote:

> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
>

    Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>


> ---
>  .../linux-generic/include/api/odp_shared_memory.h   | 21
> +++++++++++----------
>  1 file changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/platform/linux-generic/include/api/odp_shared_memory.h
> b/platform/linux-generic/include/api/odp_shared_memory.h
> index 1a59824..6836b28 100644
> --- a/platform/linux-generic/include/api/odp_shared_memory.h
> +++ b/platform/linux-generic/include/api/odp_shared_memory.h
> @@ -1,4 +1,4 @@
> -/* Copyright (c) 2013, Linaro Limited
> +/* Copyright (c) 2013-2014, Linaro Limited
>   * All rights reserved.
>   *
>   * SPDX-License-Identifier:     BSD-3-Clause
> @@ -61,10 +61,11 @@ typedef struct odp_shm_info_t {
>  /**
>   * Reserve a contiguous block of shared memory
>   *
> - * @param name   Name of the block (maximum ODP_SHM_NAME_LEN - 1 chars)
> - * @param size   Block size in bytes
> - * @param align  Block alignment in bytes
> - * @param flags  Shared mem parameter flags (ODP_SHM_*). Default value is
> 0.
> + * @param[in] name   Name of the block (maximum ODP_SHM_NAME_LEN - 1
> chars)
> + * @param[in] size   Block size in bytes
> + * @param[in] align  Block alignment in bytes
> + * @param[in] flags  Shared memory parameter flags (ODP_SHM_*).
> + *                   Default value is 0.
>   *
>   * @return Pointer to the reserved block, or NULL
>   */
> @@ -75,7 +76,7 @@ odp_shm_t odp_shm_reserve(const char *name, uint64_t
> size, uint64_t align,
>   * Free a contiguous block of shared memory
>   *
>   * Frees a previously reserved block of shared memory.
> - * @note Freeing memory that is in use will result in UNDEFINED behaviour.
> + * @note Freeing memory that is in use will result in UNDEFINED behavior
>   *
>   * @param[in] shm Block handle
>   *
> @@ -87,7 +88,7 @@ int odp_shm_free(odp_shm_t shm);
>  /**
>   * Lookup for a block of shared memory
>   *
> - * @param name   Name of the block
> + * @param[in] name   Name of the block
>   *
>   * @return Pointer to the block, or NULL
>   */
> @@ -97,7 +98,7 @@ odp_shm_t odp_shm_lookup(const char *name);
>  /**
>   * Shared memory block address
>   *
> - * @param shm   Block handle
> + * @param[in] shm   Block handle
>   *
>   * @return Memory block address, or NULL on error
>   */
> @@ -107,8 +108,8 @@ void *odp_shm_addr(odp_shm_t shm);
>  /**
>   * Shared memory block info
>   *
> - * @param shm   Block handle
> - * @param info  Block info pointer for output
> + * @param[in]  shm   Block handle
> + * @param[out] info  Block info pointer for output
>   *
>   * @return 0 on success, otherwise non-zero
>   */
> --
> 2.1.0
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov Nov. 7, 2014, 10:46 p.m. UTC | #2
/**
  * Lookup for a block of shared memory
  *
  * @param[in] name   Name of the block
  *
  * @return Pointer to the block, or NULL
  */
odp_shm_t odp_shm_lookup(const char *name);



This should be return handler of the block. Not pointer. Please fix it 
in this patch.

The same thing for odp_shm_reserve().

Maxim.



On 11/07/2014 08:27 PM, Mike Holmes wrote:
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
>   .../linux-generic/include/api/odp_shared_memory.h   | 21 +++++++++++----------
>   1 file changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/platform/linux-generic/include/api/odp_shared_memory.h b/platform/linux-generic/include/api/odp_shared_memory.h
> index 1a59824..6836b28 100644
> --- a/platform/linux-generic/include/api/odp_shared_memory.h
> +++ b/platform/linux-generic/include/api/odp_shared_memory.h
> @@ -1,4 +1,4 @@
> -/* Copyright (c) 2013, Linaro Limited
> +/* Copyright (c) 2013-2014, Linaro Limited
>    * All rights reserved.
>    *
>    * SPDX-License-Identifier:     BSD-3-Clause
> @@ -61,10 +61,11 @@ typedef struct odp_shm_info_t {
>   /**
>    * Reserve a contiguous block of shared memory
>    *
> - * @param name   Name of the block (maximum ODP_SHM_NAME_LEN - 1 chars)
> - * @param size   Block size in bytes
> - * @param align  Block alignment in bytes
> - * @param flags  Shared mem parameter flags (ODP_SHM_*). Default value is 0.
> + * @param[in] name   Name of the block (maximum ODP_SHM_NAME_LEN - 1 chars)
> + * @param[in] size   Block size in bytes
> + * @param[in] align  Block alignment in bytes
> + * @param[in] flags  Shared memory parameter flags (ODP_SHM_*).
> + *                   Default value is 0.
>    *
>    * @return Pointer to the reserved block, or NULL
>    */
> @@ -75,7 +76,7 @@ odp_shm_t odp_shm_reserve(const char *name, uint64_t size, uint64_t align,
>    * Free a contiguous block of shared memory
>    *
>    * Frees a previously reserved block of shared memory.
> - * @note Freeing memory that is in use will result in UNDEFINED behaviour.
> + * @note Freeing memory that is in use will result in UNDEFINED behavior
>    *
>    * @param[in] shm Block handle
>    *
> @@ -87,7 +88,7 @@ int odp_shm_free(odp_shm_t shm);
>   /**
>    * Lookup for a block of shared memory
>    *
> - * @param name   Name of the block
> + * @param[in] name   Name of the block
>    *
>    * @return Pointer to the block, or NULL
>    */
> @@ -97,7 +98,7 @@ odp_shm_t odp_shm_lookup(const char *name);
>   /**
>    * Shared memory block address
>    *
> - * @param shm   Block handle
> + * @param[in] shm   Block handle
>    *
>    * @return Memory block address, or NULL on error
>    */
> @@ -107,8 +108,8 @@ void *odp_shm_addr(odp_shm_t shm);
>   /**
>    * Shared memory block info
>    *
> - * @param shm   Block handle
> - * @param info  Block info pointer for output
> + * @param[in]  shm   Block handle
> + * @param[out] info  Block info pointer for output
>    *
>    * @return 0 on success, otherwise non-zero
>    */
Mike Holmes Nov. 10, 2014, 5:32 p.m. UTC | #3
Good point, I just looked at the arguments in this exercise, that needs
fixing too.

On 7 November 2014 17:46, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

> /**
>  * Lookup for a block of shared memory
>  *
>  * @param[in] name   Name of the block
>  *
>  * @return Pointer to the block, or NULL
>  */
> odp_shm_t odp_shm_lookup(const char *name);
>
>
>
> This should be return handler of the block. Not pointer. Please fix it in
> this patch.
>
> The same thing for odp_shm_reserve().
>
> Maxim.
>
>
>
>
> On 11/07/2014 08:27 PM, Mike Holmes wrote:
>
>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
>> ---
>>   .../linux-generic/include/api/odp_shared_memory.h   | 21
>> +++++++++++----------
>>   1 file changed, 11 insertions(+), 10 deletions(-)
>>
>> diff --git a/platform/linux-generic/include/api/odp_shared_memory.h
>> b/platform/linux-generic/include/api/odp_shared_memory.h
>> index 1a59824..6836b28 100644
>> --- a/platform/linux-generic/include/api/odp_shared_memory.h
>> +++ b/platform/linux-generic/include/api/odp_shared_memory.h
>> @@ -1,4 +1,4 @@
>> -/* Copyright (c) 2013, Linaro Limited
>> +/* Copyright (c) 2013-2014, Linaro Limited
>>    * All rights reserved.
>>    *
>>    * SPDX-License-Identifier:     BSD-3-Clause
>> @@ -61,10 +61,11 @@ typedef struct odp_shm_info_t {
>>   /**
>>    * Reserve a contiguous block of shared memory
>>    *
>> - * @param name   Name of the block (maximum ODP_SHM_NAME_LEN - 1 chars)
>> - * @param size   Block size in bytes
>> - * @param align  Block alignment in bytes
>> - * @param flags  Shared mem parameter flags (ODP_SHM_*). Default value
>> is 0.
>> + * @param[in] name   Name of the block (maximum ODP_SHM_NAME_LEN - 1
>> chars)
>> + * @param[in] size   Block size in bytes
>> + * @param[in] align  Block alignment in bytes
>> + * @param[in] flags  Shared memory parameter flags (ODP_SHM_*).
>> + *                   Default value is 0.
>>    *
>>    * @return Pointer to the reserved block, or NULL
>>    */
>> @@ -75,7 +76,7 @@ odp_shm_t odp_shm_reserve(const char *name, uint64_t
>> size, uint64_t align,
>>    * Free a contiguous block of shared memory
>>    *
>>    * Frees a previously reserved block of shared memory.
>> - * @note Freeing memory that is in use will result in UNDEFINED
>> behaviour.
>> + * @note Freeing memory that is in use will result in UNDEFINED behavior
>>    *
>>    * @param[in] shm Block handle
>>    *
>> @@ -87,7 +88,7 @@ int odp_shm_free(odp_shm_t shm);
>>   /**
>>    * Lookup for a block of shared memory
>>    *
>> - * @param name   Name of the block
>> + * @param[in] name   Name of the block
>>    *
>>    * @return Pointer to the block, or NULL
>>    */
>> @@ -97,7 +98,7 @@ odp_shm_t odp_shm_lookup(const char *name);
>>   /**
>>    * Shared memory block address
>>    *
>> - * @param shm   Block handle
>> + * @param[in] shm   Block handle
>>    *
>>    * @return Memory block address, or NULL on error
>>    */
>> @@ -107,8 +108,8 @@ void *odp_shm_addr(odp_shm_t shm);
>>   /**
>>    * Shared memory block info
>>    *
>> - * @param shm   Block handle
>> - * @param info  Block info pointer for output
>> + * @param[in]  shm   Block handle
>> + * @param[out] info  Block info pointer for output
>>    *
>>    * @return 0 on success, otherwise non-zero
>>    */
>>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
diff mbox

Patch

diff --git a/platform/linux-generic/include/api/odp_shared_memory.h b/platform/linux-generic/include/api/odp_shared_memory.h
index 1a59824..6836b28 100644
--- a/platform/linux-generic/include/api/odp_shared_memory.h
+++ b/platform/linux-generic/include/api/odp_shared_memory.h
@@ -1,4 +1,4 @@ 
-/* Copyright (c) 2013, Linaro Limited
+/* Copyright (c) 2013-2014, Linaro Limited
  * All rights reserved.
  *
  * SPDX-License-Identifier:     BSD-3-Clause
@@ -61,10 +61,11 @@  typedef struct odp_shm_info_t {
 /**
  * Reserve a contiguous block of shared memory
  *
- * @param name   Name of the block (maximum ODP_SHM_NAME_LEN - 1 chars)
- * @param size   Block size in bytes
- * @param align  Block alignment in bytes
- * @param flags  Shared mem parameter flags (ODP_SHM_*). Default value is 0.
+ * @param[in] name   Name of the block (maximum ODP_SHM_NAME_LEN - 1 chars)
+ * @param[in] size   Block size in bytes
+ * @param[in] align  Block alignment in bytes
+ * @param[in] flags  Shared memory parameter flags (ODP_SHM_*).
+ *                   Default value is 0.
  *
  * @return Pointer to the reserved block, or NULL
  */
@@ -75,7 +76,7 @@  odp_shm_t odp_shm_reserve(const char *name, uint64_t size, uint64_t align,
  * Free a contiguous block of shared memory
  *
  * Frees a previously reserved block of shared memory.
- * @note Freeing memory that is in use will result in UNDEFINED behaviour.
+ * @note Freeing memory that is in use will result in UNDEFINED behavior
  *
  * @param[in] shm Block handle
  *
@@ -87,7 +88,7 @@  int odp_shm_free(odp_shm_t shm);
 /**
  * Lookup for a block of shared memory
  *
- * @param name   Name of the block
+ * @param[in] name   Name of the block
  *
  * @return Pointer to the block, or NULL
  */
@@ -97,7 +98,7 @@  odp_shm_t odp_shm_lookup(const char *name);
 /**
  * Shared memory block address
  *
- * @param shm   Block handle
+ * @param[in] shm   Block handle
  *
  * @return Memory block address, or NULL on error
  */
@@ -107,8 +108,8 @@  void *odp_shm_addr(odp_shm_t shm);
 /**
  * Shared memory block info
  *
- * @param shm   Block handle
- * @param info  Block info pointer for output
+ * @param[in]  shm   Block handle
+ * @param[out] info  Block info pointer for output
  *
  * @return 0 on success, otherwise non-zero
  */