CThreads for linked C library?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CThreads for linked C library?

Johann Glaser
Hi!

libusb(x) links to libpthread:

$ ldd /lib/x86_64-linux-gnu/libusb-1.0.so.0
        linux-vdso.so.1 =>
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
        /lib64/ld-linux-x86-64.so.2

If I'm linking to libusb(x), the resulting executable also links to
libpthread.

Looking at the libusbx source code (and API documentation) reveals, that
they don't use threading, they only use the mutexes (pthread_mutex_*)
and condition variables (pthread_cond_*).

Is it necessary to have the unit "CThreads" in my Uses clause?

Thanks
  Hansi


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: CThreads for linked C library?

Bernd K.
2012/10/1 Johann Glaser <[hidden email]>:

> Is it necessary to have the unit "CThreads" in my Uses clause?

No, only if you use threads in your pascal code.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal