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

Create ANTARES_ATOMIC() {} and ANTARES_NONATOMIC() {} blocks like in avr-libc #48

Open
webconn opened this issue Jan 7, 2014 · 2 comments

Comments

@webconn
Copy link
Collaborator

webconn commented Jan 7, 2014

I think that these blocks should be very useful, because use of ANTARES_ENABLE/DISABLE_IRQS for atomic and non-atomic blocks forces enabling or disabling interrupts but not saves the state.

See http://www.nongnu.org/avr-libc/user-manual/group__util__atomic.html for example of what I mean.

@ghost ghost assigned nekromant Jan 7, 2014
@nekromant
Copy link
Owner

Yep, this is already WiP, just hasn't been pushed yet to antares git since it's not yet done for all available architectures. Expect it sometime later this month, when I'll finally have some free time.
I'm aiming for linux kernel-like spinlock_irqsave/spinlock_irqrestore api to do locking.

@nekromant
Copy link
Owner

Ooops, shouldn't have closed that one

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

No branches or pull requests

2 participants