DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal: add doc for constructor macros
@ 2017-10-02 14:59 Thomas Monjalon
  2017-10-02 18:57 ` Ferruh Yigit
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2017-10-02 14:59 UTC (permalink / raw)
  To: dev

It is a reminder that the constructors without priority
get the lowest priority.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_eal/common/include/rte_eal.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h
index 0e7363d77..559d2308e 100644
--- a/lib/librte_eal/common/include/rte_eal.h
+++ b/lib/librte_eal/common/include/rte_eal.h
@@ -287,9 +287,26 @@ static inline int rte_gettid(void)
 	return RTE_PER_LCORE(_thread_id);
 }
 
+/**
+ * Run function before main() with low priority.
+ *
+ * The constructor will be run after prioritized constructors.
+ *
+ * @param func
+ *   Constructor function.
+ */
 #define RTE_INIT(func) \
 static void __attribute__((constructor, used)) func(void)
 
+/**
+ * Run function before main() with high priority.
+ *
+ * @param func
+ *   Constructor function.
+ * @param prio
+ *   Priority number must be above 100.
+ *   Lowest number is the first to run.
+ */
 #define RTE_INIT_PRIO(func, prio) \
 static void __attribute__((constructor(prio), used)) func(void)
 
-- 
2.14.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] eal: add doc for constructor macros
  2017-10-02 14:59 [dpdk-dev] [PATCH] eal: add doc for constructor macros Thomas Monjalon
@ 2017-10-02 18:57 ` Ferruh Yigit
  2017-10-03  9:15   ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2017-10-02 18:57 UTC (permalink / raw)
  To: Thomas Monjalon, dev

On 10/2/2017 3:59 PM, Thomas Monjalon wrote:
> It is a reminder that the constructors without priority
> get the lowest priority.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] eal: add doc for constructor macros
  2017-10-02 18:57 ` Ferruh Yigit
@ 2017-10-03  9:15   ` Thomas Monjalon
  2017-10-04 13:57     ` Mcnamara, John
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2017-10-03  9:15 UTC (permalink / raw)
  To: dev; +Cc: Ferruh Yigit

02/10/2017 20:57, Ferruh Yigit:
> On 10/2/2017 3:59 PM, Thomas Monjalon wrote:
> > It is a reminder that the constructors without priority
> > get the lowest priority.
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] eal: add doc for constructor macros
  2017-10-03  9:15   ` Thomas Monjalon
@ 2017-10-04 13:57     ` Mcnamara, John
  0 siblings, 0 replies; 4+ messages in thread
From: Mcnamara, John @ 2017-10-04 13:57 UTC (permalink / raw)
  To: Thomas Monjalon, dev; +Cc: Yigit, Ferruh



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> Sent: Tuesday, October 3, 2017 10:15 AM
> To: dev@dpdk.org
> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] eal: add doc for constructor macros
> 
> 02/10/2017 20:57, Ferruh Yigit:
> > On 10/2/2017 3:59 PM, Thomas Monjalon wrote:
> > > It is a reminder that the constructors without priority get the
> > > lowest priority.
> > >
> > > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> >
> > Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 

Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-04 14:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-02 14:59 [dpdk-dev] [PATCH] eal: add doc for constructor macros Thomas Monjalon
2017-10-02 18:57 ` Ferruh Yigit
2017-10-03  9:15   ` Thomas Monjalon
2017-10-04 13:57     ` Mcnamara, John

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).