Date: Thu, 11 May 2017 11:10:22 +0200 From: Henning Schild Message-ID: <20170511111022.42264367@md1em3qc> In-Reply-To: References: <20170510170616.2f6d7a1a@md1em3qc> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] copperplate tunables with dso List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Philippe Gerum Cc: "xenomai@xenomai.org" Am Wed, 10 May 2017 17:36:21 +0200 schrieb Philippe Gerum : > On 05/10/2017 05:06 PM, Henning Schild wrote: > > Hi, > > > > today i have to a question from an application developers point of > > view. How do i override the default value of a tunable when > > libcobalt is linked with dlopen()? > > This article https://xenomai.org/2015/05/application-setup-and-init/ > > describes the tunables but not the dso-case. > > > > Is there a way to override the default values when using dlopen()? > > Maybe delaying the call to the constructors, or passing some > > arguments to them? > > > > Since 3.0.4, DSOs can have their own bootstrap module [1]. So I would > define some setup descriptor with the proper ->tune() handler in the > DSO code the same way one would do in the main executable, then use > xeno-config's --auto-init-solib flags for linking the resulting DSO, > which would glue the bootstrap code in charge of running the setup > calls. > > [1] > http://git.xenomai.org/xenomai-3.git/commit/?id=d6d8047ecd093bd827026678b3c7619b08dd7dd2 > Thanks, i guess i was just missing the --auto-init-solib, lets see how that works out. I also saw some code copying /proc/self/cmdline and it looks like that gets passed to xeno_init. I am guessing if the first main() would not fail on xenomais args they would also work? Henning