-
Notifications
You must be signed in to change notification settings - Fork 12
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
Peek function and size reporting macros changes. #1
base: master
Are you sure you want to change the base?
Conversation
Moved size reporting macros to the header file
1. Moved size reopting macros from the C file 2. Added macros giving number of elements taken and free 3. Added peek function prototy
|
rpa_queue.h
Outdated
* @param queue Pointer to the rpa_queue_t instance. | ||
* @return 1 if the queue is full, 0 otherwise. | ||
*/ | ||
#define rpa_queue_full(queue) ((queue)->nelts == (queue)->bounds) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution, but can you do this with functions rather than macros? That would allow keeping the structure private (hidden in the .c
file).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
I have added peek function taking the element without removing it from the queue. Also moved and added some size reporting functions