[asterisk-dev] Use of AST_RWLIST*
Russell Bryant
russell at digium.com
Thu Jun 4 07:30:10 CDT 2009
Holger Wirtz wrote:
> I need a dynmaicly created in- and out-queue for "struct ast_frame*". I
> tried to implement them with astobj2 but it seems that I haven't
> understand how to use ao2 objects as a simple queue (for hashes ao2
> objects working real fine).
Correct, an astobj2 container as implemented today does not fit this need.
> Now I am trying to use AST_RWLIST but I don't understand how to use it.
> I tried to find some information from other code without success. So I
> hope somebody from this list can give me some hints what I am doing
> wrong. Also reading asterisk/include/linkedlists.h does not help to
> recognize how to use AST_RWLIST...
>
> Has anyone a hint for me how to set up my queues?
Well, it would probably be easier to answer if you have a specific
question about a problem you have.
In general, to create a queue with a list, you use the INSERT_TAIL() and
REMOVE_HEAD() operations.
--
Russell Bryant
Digium, Inc. | Senior Software Engineer, Open Source Team Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-dev
mailing list