[odb-users] Use of thread local storage in ODB

Andrew Cunningham odb at a-cunningham.com
Sat Sep 3 14:35:09 EDT 2016


It depends on whether your app is running transactions in multiple threads.
ODB has a concept of the "current transaction"  and the "current session"
which are  variables that are TLS ( local to a thread).
You might need to come up with another mechanism if you can't use the
standard __thread.

I would protest to Apple about rejecting your app. I can't see how
compiling against "public" POSIX threading API's could be seen as using
private APIs. Apple , of course, uses some automatic scanning of the app,
maybe get a human involved.


On Fri, Sep 2, 2016 at 4:54 PM, Hales, Steve <Steve.Hales at garmin.com> wrote:

> My team has created an iOS app that uses ODB. We recently submitted the
> app to Apple to be published in the app store. Our app was rejected due to
> the presence of the symbol "__tlv_bootstrap" which Apple considers to be
> part of an unapproved private API. Our research indicates that this symbol
> results from use of the "__thread" modifier to create a thread local
> variable. The only place we can find __thread in our code is in the ODB
> header tls.hxx where it appears to take effect when POSIX threads are
> enabled. When we built the ODB library for our app we specified
> --enable-threads in the configure step. Can you tell us if that header,
> specifically the __thread use, is likely to be included in our code? If so,
> would rebuilding ODB with threads disabled remove it? And what effect might
> that have on our app?
>
> Thanks,
> Steve
>
> ________________________________
>
> CONFIDENTIALITY NOTICE: This email and any attachments are for the sole
> use of the intended recipient(s) and contain information that may be Garmin
> confidential and/or Garmin legally privileged. If you have received this
> email in error, please notify the sender by reply email and delete the
> message. Any disclosure, copying, distribution or use of this communication
> (including attachments) by someone other than the intended recipient is
> prohibited. Thank you.
>


More information about the odb-users mailing list