mirror of https://github.com/ARMmbed/mbed-os.git
Move Nanostack connect semaphore into object
Connect semaphore was being constructed and consuming RAM even if Nanostack isn't in use. Avoid this by moving it into the class, where it should be anyway.
parent
30a5366927
commit
4eb394e391
|
@ -107,8 +107,7 @@ private:
|
|||
socket_mode_t mode;
|
||||
};
|
||||
|
||||
static Semaphore connect_semaphore(0);
|
||||
static NanostackSocket * socket_tbl[NS_INTERFACE_SOCKETS_MAX] = {0};
|
||||
static NanostackSocket * socket_tbl[NS_INTERFACE_SOCKETS_MAX];
|
||||
|
||||
static int map_mesh_error(mesh_error_t err)
|
||||
{
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
class NanostackInterface : public MeshInterface, public NetworkStack {
|
||||
public:
|
||||
NanostackInterface() : connect_semaphore(0) { }
|
||||
int disconnect();
|
||||
|
||||
/** Get the internally stored IP address
|
||||
|
@ -226,6 +227,7 @@ protected:
|
|||
uint8_t eui64[8];
|
||||
char ip_addr_str[40];
|
||||
char mac_addr_str[24];
|
||||
Semaphore connect_semaphore;
|
||||
};
|
||||
|
||||
class LoWPANNDInterface : public NanostackInterface {
|
||||
|
|
Loading…
Reference in New Issue