Go to file
Bogdan Marinescu 337c1af22c Don't send events on close()
It's currently possible to generate a socket event when a non-blocking socket is closed:

1. _pending is set to 0 in https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TCPSocket.cpp#L22
   when the socket is created.
2. close() calls event() in https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/Socket.cpp#L66
3. event() increments _pending, and since _pending is 1 it will call _callback() in https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TCPSocket.cpp#L167

However, if send() (for example) is called, this can happen:

- send() is called and sets _pending to 0.
- when the data is sent, event() is called, which sets _pending to 1 and calls _callback().
- if close() is called at this point, there won't be an event generated for close() anymore,
  since _pending will be set to 2.

Same thing for recv. Also, same thing for TCPServer and UDPSocket.

This PR changes the initial value of _pending to 1 instead of 0, so that
events are never generated for close().
2016-12-07 17:52:16 +02:00
.github Update pull_request_template.md 2016-09-08 12:05:47 +03:00
TESTS Merge pull request #3157 from SiliconLabs/SiliconLabs-EFR32 2016-12-02 15:46:35 +01:00
cmsis Ensure isr cannot occur after NVIC_DisableIRQ 2016-11-17 12:26:45 -06:00
docs [Exporter docs] index.json update instructions 2016-12-01 11:09:51 +08:00
drivers I2C - correct return values for write functions 2016-11-21 11:26:02 +00:00
events Added equeue tests to travis CI 2016-11-21 12:48:16 -06:00
features Don't send events on close() 2016-12-07 17:52:16 +02:00
hal Merge pull request #3301 from 0xc0170/fix_issue#2725 2016-12-02 15:47:08 +01:00
platform Merge pull request #3157 from SiliconLabs/SiliconLabs-EFR32 2016-12-02 15:46:35 +01:00
rtos Marked the RtosTimer class as deprecated 2016-11-07 13:01:08 -06:00
targets Merge pull request #3317 from jeromecoutant/PR_F429 2016-12-05 16:53:09 +00:00
tools Merge pull request #3349 from sarahmarshy/patch-7 2016-12-02 15:52:38 +01:00
.gitattributes Added .gitattributes for automatic LF line ending conversion 2013-08-08 13:19:34 +03:00
.gitignore Ignore BUILD directory 2016-10-04 15:08:40 +03:00
.pylintrc Add pylint configuration file 2016-08-16 11:48:45 -05:00
.travis.yml Added equeue tests to travis CI 2016-11-21 12:48:16 -06:00
CONTRIBUTING.md Update CONTRIBUTING.md 2016-09-11 21:24:11 +08:00
DOXYGEN_FRONTPAGE.md Very minimal text 2016-08-04 14:09:59 +01:00
Jenkinsfile Update Jenkinsfile 2016-09-20 16:05:59 +03:00
LICENSE Add Apache v2 LICENSE file 2013-08-06 12:05:04 +01:00
README.md Update README.md 2016-10-21 19:09:41 +01:00
mbed.h Add mbed OS version macros 2016-11-04 21:43:00 +00:00
requirements.txt Remove pycurl dependency 2016-10-20 16:24:47 -05:00

README.md

ARM mbed OS

mbed OS is an open-source embedded operating system designed specifically for the "things" in the Internet of Things (IoT). It includes all the features you need to develop a connected product based on an ARM Cortex-M microcontroller.

mbed OS accelerates the process of creating a connected product by providing a platform operating system that includes robust security foundations, standards based communication capabilities, built-in cloud management services, and drivers for sensors, I/O devices and connectivity. mbed OS is built as a modular, configurable software stack so that you can readily customize it to the device you're developing for, and reduce memory requirements by excluding unnecessary software components.

Current release

Our current release series is mbed OS 5.2:

Getting Started for Developers

We have a getting started guide for developers using mbed OS in applications:

Getting Started for Contributors

We have a getting started guide for contributors working on mbed OS:

  • Have a look in the docs directory