[Libreoffice] [PUSHED] Some OSL cleanup

Arnaud Versini arnaud.versini at gmail.com
Mon Nov 21 11:08:01 PST 2011


Thanks,

For getpid, this is my mistake, sorry, I must check before if NPTL getpid
is conform to the posix requirements (one PID for all threads in one
process). It seems to be Posix compliant :

http://linux.die.net/man/7/pthreads

I will check and send you a patch for this.

I want to add some annotations like format_arg and noreturn (or an
equivalent for MSVC, CLang...)  specially for trace, assert, abort and
info. Is it useful ?

Best regards

2011/11/21 Michael Meeks <michael.meeks at suse.com>

> Hi there,
>
> On Fri, 2011-11-18 at 20:15 +0100, Arnaud Versini wrote:
> > The first patch replace the usage of gethostbyname by the reentrant
> > version.
>
>         Looks nice, and functional for all unix's that I can see :-)
>
> > The second and third patch removes internal gethostbyname_r, backtrace
> > and  backtrace_symbols_fd. I'm not sure about these two patches, those
> > functions are in the libc on all current OS and symbols are not
> > exported.
>
>         The second looks fine; after all we have this osl_ variant that we
> are
> actually using - lets hope that _osl_gethostbyname_r wasn't using this
> impl. on some obscure platform.
>
>        I reverted the getpid() section from it - sadly, getpid does (or
> did)
> do odd things on Linux around threads (as the comment says) and it's
> hard to see what that might break.
>
>        The backtrace patch at worst seems to undo a fix for a
> non-functiuoning
> Linux/sparc backtrace method:
>
>        https://issues.apache.org/ooo/show_bug.cgi?id=18052
>
>        that we can expect is fixed now, and since we don't submit
> backtraces
> via the crash-reporter anyway ... ;-)
>
>        So some nice cleanups; thanks ...
>
>        One thing I noticed there was the under-usage of osl_sempahore and
> related bits. It might be worth checking the rest of the code to see if
> in fact we need this at all - the Condition stuff is much more widely
> used.
>
>        If we find it is not / hardly ever used, we could use the generic:
>
> #ifdef NO_PTHREAD_SEMAPHORES
>
>        implementation directly in-lined in the semaphore impl. and schedule
> Semaphore for ultimate removal in LibreOffice 4:
>
>        http://wiki.documentfoundation.org/Development/LibreOffice4
>
>        But perhaps I'm missing something there.
>
>        Anyhow - thanks for that ! :-)
>
>        ATB,
>
>                Michael.
>
> --
> michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot
>
>


-- 
Arnaud Versini
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111121/1323bc0c/attachment.htm>


More information about the LibreOffice mailing list