[asterisk-dev] ast_frame allocation/free question

Kevin P. Fleming kpfleming at digium.com
Thu Nov 29 07:42:08 CST 2007

Klaus Darilion wrote:

> Are static buffers thread safe?

There is no way to answer that question 'in general', but in some cases
they are, yes. Consider, for example a channel driver that can only
handle one channel at a time (chan_oss, for example); it never has to be
concerned about supplying frames to multiple threads. It's also possible
when a channel driver with a single 'signaling' thread (like chan_zap or
chan_sip) is queueing a special frame, because it knows that the code
handling the signaling will never execute in multiple threads.

Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)

More information about the asterisk-dev mailing list