Added c bindings for threads.
Self-review