Squashed commit of the following:

net/utils:  return from net_breaklock() was being clobbered.
    net/:  Replace all calls to iob_alloc() with calls to net_ioballoc() which will release the network lock, if necessary.
    net/utils, tcp, include/net:  Separate out the special IOB allocation logic and place it in its own function.  Prototype is available in a public header file where it can also be used by network drivers.
    net/utils: net_timedwait() now uses new net_breaklock() and net_restorelock().
This commit is contained in:
Gregory Nutt
2018-07-07 08:26:13 -06:00
parent 75cc19ebb4
commit 427b3b8fcb
8 changed files with 110 additions and 59 deletions
+4 -3
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* net/sixlowpan/sixlowpan_framelist.c
*
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2017-2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Parts of this file derive from Contiki:
@@ -59,6 +59,7 @@
#include <nuttx/net/radiodev.h>
#include <nuttx/wireless/ieee802154/ieee802154_mac.h>
#include "utils/utils.h"
#include "sixlowpan/sixlowpan_internal.h"
#ifdef CONFIG_NET_6LOWPAN
@@ -409,7 +410,7 @@ int sixlowpan_queue_frames(FAR struct radio_driver_s *radio,
* necessary.
*/
iob = iob_alloc(false);
iob = net_ioballoc(false);
DEBUGASSERT(iob != NULL);
/* Initialize the IOB */
@@ -633,7 +634,7 @@ int sixlowpan_queue_frames(FAR struct radio_driver_s *radio,
* necessary.
*/
iob = iob_alloc(false);
iob = net_ioballoc(false);
DEBUGASSERT(iob != NULL);
/* Initialize the IOB */