Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert internal lock-management to pthread #6

Closed
federicosilvestri opened this issue Aug 13, 2018 · 1 comment
Closed

Convert internal lock-management to pthread #6

federicosilvestri opened this issue Aug 13, 2018 · 1 comment

Comments

@federicosilvestri
Copy link

You can't use an internal locking-unlocking system, because you should disable interruptions during lock or unlock execution (it's not possible with CPU in user-mode). So you can include pthread and use a mutex. Let me know for a pull-request.

@rxi
Copy link
Owner

rxi commented Aug 13, 2018

I'm not sure I understand what you mean. The user can use a pthread mutex with the library by using the log_set_lock() function: https://github.com/rxi/log.c#log_set_locklog_lockfn-fn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants