[Asterisk-code-review] pbx: Create pbx sw.c for management of 'struct ast sw'. (asterisk[master])

Corey Farrell asteriskteam at digium.com
Thu Jul 21 12:59:40 CDT 2016


Hello Anonymous Coward #1000019,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/3282

to look at the new patch set (#2).

Change subject: pbx: Create pbx_sw.c for management of 'struct ast_sw'.
......................................................................

pbx: Create pbx_sw.c for management of 'struct ast_sw'.

This changes context switches from a linked list to a vector, makes
'struct ast_sw' opaque to pbx.c.

Although ast_walk_context_switches is maintained the procedure is no
longer efficient except for the first call (inc==NULL).  This
functionality is replaced by two new functions implemented by vector
macros.
* ast_context_switches_count (AST_VECTOR_SIZE)
* ast_context_switches_get (AST_VECTOR_GET)

As with ast_walk_context_switches callers of these functions are
expected to have locked contexts.  Only a few places in Asterisk walked
the switches, they have been converted to use the new functions.

Change-Id: I08deb016df22eee8288eb03de62593e45a1f0998
---
M include/asterisk/pbx.h
M main/pbx.c
M main/pbx_private.h
A main/pbx_sw.c
M pbx/pbx_config.c
M res/ael/pval.c
M utils/conf2ael.c
M utils/extconf.c
8 files changed, 235 insertions(+), 114 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/82/3282/2
-- 
To view, visit https://gerrit.asterisk.org/3282
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I08deb016df22eee8288eb03de62593e45a1f0998
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Anonymous Coward #1000019



More information about the asterisk-code-review mailing list