diff options
| author | Grissiom <[email protected]> | 2013-07-09 11:54:50 +0800 |
|---|---|---|
| committer | Grissiom <[email protected]> | 2013-07-09 15:44:55 +0800 |
| commit | 7bcce9e87fa987d4bb88d48d3f7d0aca58963e74 (patch) | |
| tree | 6da79ac66cf7acefb579f8b987e86e939391a191 /include/rtthread.h | |
| parent | 4f0cb887393a26455c87326bbe2713e2cb44a097 (diff) | |
device: add ref_count support
This is a simple work around to the current device stack design. A
ref_count could let different modules to open/close the same device
independently without interfere others in some degree.
But there is still some data shared between the modules, like flag,
open_flag and user_data. Moreover, it won't yield an error if A open a
device, and B read from it before open it in B. Maybe alloc a new handle
in rt_device_open will be the ultimate solution. But that is much bigger
change and we may leave it to future development.
Diffstat (limited to 'include/rtthread.h')
0 files changed, 0 insertions, 0 deletions
