openpilot/common
Willem Melching 74aa6e29c9
Params: new class FileLock (#20636)
* new class LockFile

* lock->try_lock

* rebase master

* close if fd_ >=0

* rename try_lock to lock

* keep tryring if flock() return EINTR

* throw exception on error

* keep trying if open() gets interrupted by a signal

* close fd_ before throw flock exception

* add macro HANDLE_EINTR

* HANDLE_EINTR for open & write

* add errno in exception

* add destructor

* don't throw exception,log err and return

* Revert "don't throw exception,log err and return"

This reverts commit 6e1ba4a1bd82de3d4d07db5238a82184fd2ec9b4.

* add lock file name in exception

* cleanup  exception text

* use lock_guard in function put

* anonymous namespace

* use do-while(0) instead of goto

* cleanup read_db_all

* cleanup FileLock

* remove fchmod 0666 for apks

* Revert "remove fchmod 0666 for apks"

This reverts commit b389c31762417c4465d73be2453efcf7bc693aee.

* log instead of runtime error

* keep libs

Co-authored-by: deanlee <deanlee3@gmail.com>
2021-04-09 16:35:44 +02:00
..
api Fix jwt.encode return type (#19776) (#19958) 2021-02-02 15:36:04 +01:00
kalman Scons builder for cython extensions (#2485) 2020-11-11 21:14:51 +01:00
tests add putBool/getBool wrappers to cython params class (#20611) 2021-04-07 15:36:37 +02:00
transformations fixup ui (#20049) 2021-02-09 17:23:46 -08:00
.gitignore common folder 2020-01-17 10:28:44 -08:00
SConscript Params: new class FileLock (#20636) 2021-04-09 16:35:44 +02:00
__init__.py common folder 2020-01-17 10:28:44 -08:00
basedir.py Qt Offroad stats (#19498) 2020-12-18 13:29:20 +01:00
clock.pyx Scons builder for cython extensions (#2485) 2020-11-11 21:14:51 +01:00
cython_hacks.py common folder 2020-01-17 10:28:44 -08:00
dict_helpers.py log to file and send through athena (#20250) 2021-03-25 13:30:09 -07:00
ffi_wrapper.py --std=c++17 (#2330) 2020-10-17 13:33:12 -07:00
file_helpers.py mkdirs_exists_ok more specific URL detection 2020-06-09 08:56:16 -07:00
filter_simple.py add low pass filter on cpu temp (#1305) 2020-04-01 15:58:40 -07:00
gpio.py HW abstraction layer (#19530) 2020-12-16 21:30:23 -08:00
lazy_property.py common folder 2020-01-17 10:28:44 -08:00
logging_extra.py logging cleanup (#20502) 2021-03-26 17:36:01 -07:00
numpy_fast.py Enable more flake8 checks (#1602) 2020-05-30 20:14:58 -07:00
numpy_helpers.py Mpc rework2 (#19660) 2021-01-14 18:43:50 -08:00
params.py params helpers (#19788) 2021-01-19 14:39:00 -08:00
params_pxd.pxd add putBool/getBool wrappers to cython params class (#20611) 2021-04-07 15:36:37 +02:00
params_pyx.pyx ecam toggle (#20597) 2021-04-07 19:12:35 +02:00
profiler.py improve profiler 2020-10-09 18:39:54 -07:00
realtime.py HW abstraction layer (#19530) 2020-12-16 21:30:23 -08:00
spinner.py Spinner: wait for UI to start (#20279) 2021-03-09 13:37:11 -08:00
stat_live.py Flake8 E22X (#1607) 2020-05-31 00:48:47 -07:00
string_helpers.py Enable more flake8 checks (#1602) 2020-05-30 20:14:58 -07:00
text_window.py Qt spinner (#2494) 2020-11-06 18:44:04 -08:00
timeout.py Enable more flake8 checks (#1602) 2020-05-30 20:14:58 -07:00
window.py support for halve in Window 2020-10-20 16:07:05 -07:00
xattr.py uploader: do not delete files after uploading (#1253) 2020-03-19 18:09:26 -07:00