From: ext Ola Liljedahl [mailto:[email protected]] 
Sent: Thursday, September 04, 2014 1:08 PM
To: Savolainen, Petri (NSN - FI/Espoo)
Cc: ext Anders Roxell; Maxim Uvarov; [email protected]
Subject: Re: [lng-odp] [PATCH] Timer API and and priority queue-based 
implementation

We are requiring all internal header files to have "odp_" prefix? Isn't it 
enough that they are included using "" and not <> which is used for system 
header files?

[Petri] With odp_ prefix, it's clear where it comes from. E.g. C++ seems to 
have "priority_queue" class, which gcc implements in priority_queue.hpp. If "" 
search fails (due to makefile problems, etc), the search may continue as <>... 
Again, those name space confusions just waste time when reading/debugging 
makefiles and code.


The priority_queue is not an ODP construct, it is completely generic. It is 
like a library function except it does not exist in any external library. Maybe 
it should be located in a separate directory though, e.g. 
platform/linux-generic/utility or even on a top-level utility library?

[Petri] Better to keep it under linux-generic.

And why putting .h files in a separate directory? They are part of the 
implementation just like the .c files (so private, not public). Definitions 
move between the .c and the .h files as needed. Why are the .c files located in 
the same directory as the Makefile and a bunch of TEXT files? What makes the 
internal header files special compared to all other internal files?

[Petri] Linux-generic have already over 30 implementation files (+ over 30 API 
files). It's easier to find a .c or .h file when those are in different 
directories. odp_xyz_internal.h are implementation specifics of API files (vs. 
odp_xyz.h). True, _internal tag is not good but may be something else that 
highlights that's not an API.

-Petri

-- Ola


On 4 September 2014 09:58, Savolainen, Petri (NSN - FI/Espoo) 
<[email protected]> wrote:

platform/linux-generic/priority_queue.h

Should be moved and renamed to

platform/linux-generic/include/odp_priority_queue_internal.h

or something similar. All ODP headers have either odp_ or odph_ prefix so that 
it easy to see with are ODP vs. c lib/linux/posix includes.


-Petri



_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to