diff options
| author | PProvost <[email protected]> | 2020-05-11 08:54:23 -0600 |
|---|---|---|
| committer | PProvost <[email protected]> | 2020-05-11 08:54:23 -0600 |
| commit | 0c4f784459a7564933ed91bf39f00d12608cf91c (patch) | |
| tree | cfa743731d1cfb11d83119bf1c8d0d942e8c3c73 /common/src/nx_ip_driver_deferred_processing.c | |
Initial commit
Diffstat (limited to 'common/src/nx_ip_driver_deferred_processing.c')
| -rw-r--r-- | common/src/nx_ip_driver_deferred_processing.c | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/common/src/nx_ip_driver_deferred_processing.c b/common/src/nx_ip_driver_deferred_processing.c new file mode 100644 index 00000000..f464d015 --- /dev/null +++ b/common/src/nx_ip_driver_deferred_processing.c @@ -0,0 +1,83 @@ +/**************************************************************************/ +/* */ +/* Copyright (c) Microsoft Corporation. All rights reserved. */ +/* */ +/* This software is licensed under the Microsoft Software License */ +/* Terms for Microsoft Azure RTOS. Full text of the license can be */ +/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ +/* and in the root directory of this software. */ +/* */ +/**************************************************************************/ + + +/**************************************************************************/ +/**************************************************************************/ +/** */ +/** NetX Component */ +/** */ +/** Internet Protocol (IP) */ +/** */ +/**************************************************************************/ +/**************************************************************************/ + +#define NX_SOURCE_CODE + + +/* Include necessary system files. */ + +#include "nx_api.h" +#include "nx_ip.h" + + +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _nx_ip_driver_deferred_processing PORTABLE C */ +/* 6.0 */ +/* AUTHOR */ +/* */ +/* Yuxin Zhou, Microsoft Corporation */ +/* */ +/* DESCRIPTION */ +/* */ +/* This function causes the driver to be called from the IP helper */ +/* thread in order to finish some deferred processing. A typical */ +/* example of this is the transmit complete interrupt. Instead of */ +/* loading the packet inside the transmit complete interrupt, the */ +/* driver can setup some internal variables and call this routine */ +/* to be called subsequently from the IP helper thread to finish */ +/* the transmit complete interrupt processing. */ +/* */ +/* INPUT */ +/* */ +/* ip_ptr Pointer to IP control block */ +/* */ +/* OUTPUT */ +/* */ +/* None */ +/* */ +/* CALLS */ +/* */ +/* tx_event_flags_set Set event flags to wake IP */ +/* helper thread */ +/* */ +/* CALLED BY */ +/* */ +/* Application Driver */ +/* */ +/* RELEASE HISTORY */ +/* */ +/* DATE NAME DESCRIPTION */ +/* */ +/* 05-19-2020 Yuxin Zhou Initial Version 6.0 */ +/* */ +/**************************************************************************/ +VOID _nx_ip_driver_deferred_processing(NX_IP *ip_ptr) +{ + + /* Set event flags to wake the IP helper thread, which will in turn + call the driver with the NX_LINK_DEFERRED_PROCESSING command. */ + tx_event_flags_set(&(ip_ptr -> nx_ip_events), NX_IP_DRIVER_DEFERRED_EVENT, TX_OR); +} + |
