summaryrefslogtreecommitdiff
path: root/software/octdeviceapi/oct6100api/oct6100_api/oct6100_events.c
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2011-02-10 16:22:55 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-02-27 21:34:00 +0200
commit0867515a55e4ac8176a396b8de60d7ad5310447c (patch)
tree64a79c496042a966dd5056f0acf4c6d4efec7301 /software/octdeviceapi/oct6100api/oct6100_api/oct6100_events.c
parenteb755c20d77990e9c3bb9295a05ed95787db96b6 (diff)
wct4xxp: Reduce stack usage in oct612x API.dahdi-embedded
Reduce the stack usage by replacing the mOCT6100_RETRIEVE_NLP_CONF_DWORD and mOCT6100_SAVE_NLP_CONF_DWORD macros with functions. Some compilers do a better job of optimizing the local variables declared in those macros than others. For example, with gcc 4.3.0, running ]# make stackcheck | grep Oct6100 | head -n 20 | sed -e 's/^0\S* //g' | uniq Before: Oct6100ApiWriteVqeNlpMemory [wct4xxp]: 1112 Oct6100ApiInvalidateChanPlayoutStructs [wct4xxp]:520 Oct6100ApiSetChannelLevelControl [wct4xxp]: 392 Oct6100ApiBridgeEventRemove [wct4xxp]: 344 Oct6100ApiDebugChannelOpen [wct4xxp]: 312 Oct6100ApiWriteVqeAfMemory [wct4xxp]: 296 Oct6100ApiSetChannelTailConfiguration [wct4xxp]:264 Oct6100ApiRandomMemoryWrite [wct4xxp]: 248 Oct6100ApiTransferToneEvents [wct4xxp]: 248 Oct6100ApiModifyChannelStructs [wct4xxp]: 232 After: Oct6100ApiBridgeEventRemove [wct4xxp]: 344 Oct6100ApiDebugChannelOpen [wct4xxp]: 312 Oct6100ApiRandomMemoryWrite [wct4xxp]: 248 Oct6100ApiTransferToneEvents [wct4xxp]: 248 Oct6100ApiInvalidateChanPlayoutStructs [wct4xxp]:248 Oct6100ApiModifyChannelStructs [wct4xxp]: 232 Oct6100ApiBridgeRemoveParticipantFromChannel [wct4xxp]:216 Oct6100ApiWriteVqeNlpMemory [wct4xxp]: 200 Oct6100ApiInitChannels [wct4xxp]: 168 Oct6100ApiProgramNLP [wct4xxp]: 168 Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9751 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'software/octdeviceapi/oct6100api/oct6100_api/oct6100_events.c')
-rw-r--r--software/octdeviceapi/oct6100api/oct6100_api/oct6100_events.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_events.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_events.c
index 7fa36d6..16bf036 100644
--- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_events.c
+++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_events.c
@@ -1241,11 +1241,10 @@ UINT32 Oct6100BufferPlayoutCheckForSpecificEvent(
}
/* Retrieve the current write pointer. */
- mOCT6100_RETRIEVE_NLP_CONF_DWORD( f_pApiInstance,
+ ulResult = oct6100_retrieve_nlp_conf_dword(f_pApiInstance,
pEchoChannel,
ulPlayoutBaseAddress + ulWritePtrBytesOfst,
- &ulTempData,
- ulResult );
+ &ulTempData);
if ( ulResult != cOCT6100_ERR_OK )
return ulResult;