px4_daemon: fix locking
It was not enough to lock individual accesses to the maps. For example it could happen that a thread was started and exited very quickly, before the pthread_t item was inserted into the map, such that when the cleanup method was called, the thread and pipe fd were not found (and fd=0=stdin was closed).
Showing
- platforms/posix/src/px4_daemon/server.cpp 47 additions, 14 deletionsplatforms/posix/src/px4_daemon/server.cpp
- platforms/posix/src/px4_daemon/server.h 20 additions, 3 deletionsplatforms/posix/src/px4_daemon/server.h
- platforms/posix/src/px4_daemon/threadsafe_map.h 0 additions, 104 deletionsplatforms/posix/src/px4_daemon/threadsafe_map.h
Please register or sign in to comment