diff mbox

[ARCH] api_guide_lines: Internal functions

Message ID 1417032799-38487-1-git-send-email-mike.holmes@linaro.org
State Accepted
Headers show

Commit Message

Mike Holmes Nov. 26, 2014, 8:13 p.m. UTC
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 api_guide_lines.dox | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Taras Kondratiuk Nov. 27, 2014, 10:01 a.m. UTC | #1
On 11/26/2014 10:13 PM, Mike Holmes wrote:
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
>  api_guide_lines.dox | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/api_guide_lines.dox b/api_guide_lines.dox
> index be23e9a..1f83c53 100644
> --- a/api_guide_lines.dox
> +++ b/api_guide_lines.dox
> @@ -144,6 +144,12 @@ The values  !0 = true, 0 = false are used for this purpose.
>  Pass indications are integers (int) and SHOULD also be used for APIs that return a simple success/failure indication to the caller.
>  In this case the return value 0 indicates success while non-zero (typically -1) indicates failure and errno is set to a reason code that indicates the nature of the failure.
>  
> +@subsection odp_internal Internal APIs
> +When an interface is defined in a header file and is intended to to be reused internally it will follow these rules:-
> +- Be prefixed with an underscore "_".
> +- It may not be placed in include/api.

Is this item necessary?
I have some internal APIs that are used by ODP API which implemented as
'static inline' functions directly in API headers. These internal APIs
have to be placed in include/api.

> +- All the required definitions for the API are to use an underscore, this includes MACROS, typedefs, enums and function names.
> +
>  @section implementation Implementation Considerations
>  To support application portability and preserve implementation flexibility, ODP APIs MUST be designed with several guiding principles in mind.
>  
>
Mike Holmes Dec. 1, 2014, 3:30 p.m. UTC | #2
On 27 November 2014 at 05:01, Taras Kondratiuk <taras.kondratiuk@linaro.org>
wrote:

> On 11/26/2014 10:13 PM, Mike Holmes wrote:
> > Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> > ---
> >  api_guide_lines.dox | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/api_guide_lines.dox b/api_guide_lines.dox
> > index be23e9a..1f83c53 100644
> > --- a/api_guide_lines.dox
> > +++ b/api_guide_lines.dox
> > @@ -144,6 +144,12 @@ The values  !0 = true, 0 = false are used for this
> purpose.
> >  Pass indications are integers (int) and SHOULD also be used for APIs
> that return a simple success/failure indication to the caller.
> >  In this case the return value 0 indicates success while non-zero
> (typically -1) indicates failure and errno is set to a reason code that
> indicates the nature of the failure.
> >
> > +@subsection odp_internal Internal APIs
> > +When an interface is defined in a header file and is intended to to be
> reused internally it will follow these rules:-
> > +- Be prefixed with an underscore "_".
> > +- It may not be placed in include/api.
>
> Is this item necessary?
> I have some internal APIs that are used by ODP API which implemented as
> 'static inline' functions directly in API headers. These internal APIs
> have to be placed in include/api.
>

Ok, If that is too restrictive I can drop it.


>
> > +- All the required definitions for the API are to use an underscore,
> this includes MACROS, typedefs, enums and function names.
> > +
> >  @section implementation Implementation Considerations
> >  To support application portability and preserve implementation
> flexibility, ODP APIs MUST be designed with several guiding principles in
> mind.
> >
> >
>
>
> --
> Taras Kondratiuk
>
diff mbox

Patch

diff --git a/api_guide_lines.dox b/api_guide_lines.dox
index be23e9a..1f83c53 100644
--- a/api_guide_lines.dox
+++ b/api_guide_lines.dox
@@ -144,6 +144,12 @@  The values  !0 = true, 0 = false are used for this purpose.
 Pass indications are integers (int) and SHOULD also be used for APIs that return a simple success/failure indication to the caller.
 In this case the return value 0 indicates success while non-zero (typically -1) indicates failure and errno is set to a reason code that indicates the nature of the failure.
 
+@subsection odp_internal Internal APIs
+When an interface is defined in a header file and is intended to to be reused internally it will follow these rules:-
+- Be prefixed with an underscore "_".
+- It may not be placed in include/api.
+- All the required definitions for the API are to use an underscore, this includes MACROS, typedefs, enums and function names.
+
 @section implementation Implementation Considerations
 To support application portability and preserve implementation flexibility, ODP APIs MUST be designed with several guiding principles in mind.