Commit Graph

33 Commits

Author SHA1 Message Date
Lorenz Meier 8d4edd74b8 Platforms: Header cleanup 2016-12-27 21:00:51 +01:00
Carlo Wood de85fbe1dc Remaining fixes needed before running Tools/fix_headers.sh
<systemlib/err.h> --> "systemlib/err.h" that fix_headers.sh
would miss because it comes after code it doesn't understand.

Effectively remove the '__EXPORT extern perf_counter_t perf_alloc('
line, because currently perf_alloc is defined to be NULL, and
after running fix_headers.sh that happens *before* this header
is included (the order of headers will be changed).

Do not define NULL to be (void*)0: that only works for C.
In fact, the conversions needed for NULL are so full of exceptions
that standard C++ introduced a new *keyword*: nullptr.
That's what we really should be using for C++ code.
In this case I just include the correct header to define NULL
the correct way.

Not really related to the header line:
Removed an #include <time.h> because I noted that px4_time.h
was already included... and moved a #include <sys/time.h>
to the top of the file (not really a fan of including headers
in the middle unless absolutely necessary).
Removed a include of queue.h because I noted it wasn't used.
2016-11-13 19:36:27 +01:00
Beat Küng b6b8892606 hrt_queue: add px4_posix.h include for px4_getpid() 2016-09-30 13:50:51 +02:00
Beat Küng f25947b964 hrt_work_queue posix: only send a wake-up signal if not called from own thread
The simulated timer interrupt always adds a new scheduled work task, which
is called from the work queue thread. Sending the signal creates measurable
overhead (~5% of the px4 CPU runtime) and is unnecessary, since the thread
is not sleeping anyway.
2016-09-30 13:50:51 +02:00
Julian Oes 8ff237c69f Remove size optimization for individual modules
It makes more sense to set the optimization flags on a platform basis
instead of individually for each module. This allows for different
optimization options for SITL, NuttX, Snapdragon, etc.
2016-09-30 08:11:51 +02:00
Beat Küng 8a12dee125 cmake: remove all module.mk files & cmake conversion script (#4918)
It seems these files are leftovers.
2016-06-28 09:26:36 +02:00
Stefan 6e1bf506ad Update dq_rem.c
spelling mistakes
2016-01-11 08:37:43 +01:00
tumbili 33f85a5024 fixed unused variable 2015-12-01 15:01:15 +01:00
Lorenz Meier 905edfd9c9 HRT: Do not set thread name on Linux 2015-12-01 14:24:43 +01:00
Lorenz Meier 2db915080c Linux compile fix 2015-12-01 14:14:17 +01:00
Lorenz Meier a54b40c457 Do not redefine GNU source in platform for POSIX 2015-12-01 13:50:12 +01:00
Lorenz Meier 754aa6e94f Work thread: Add missing header for Linux 2015-12-01 13:42:06 +01:00
Lorenz Meier a048832d55 HRT thread: Linux: Add missing macro 2015-12-01 13:35:54 +01:00
Lorenz Meier bd0fcfb07a Work queue: Fix for Linux build 2015-12-01 13:26:26 +01:00
Lorenz Meier 1b65bba083 Work queue: Code style fixes 2015-12-01 12:44:22 +01:00
Lorenz Meier b170467a1d HRT thread: Set thread name 2015-12-01 12:04:53 +01:00
Lorenz Meier 79a030ec50 Work threads: Ensure they have proper names 2015-12-01 12:04:34 +01:00
Lorenz Meier f6a6c41af5 POSIX: More Travis compile fixes 2015-11-22 15:30:36 +01:00
Lorenz Meier c003305472 HRT thread: Fix style 2015-11-22 14:01:52 +01:00
Lorenz Meier 0a883fd11d HRT thread: Do not make implicit assumptions about struct members 2015-11-22 14:01:52 +01:00
Lorenz Meier 3af906b9a8 Ensure g_hrt_work is zero-initialized 2015-11-22 14:01:52 +01:00
Lorenz Meier d60f201dc8 POSIX: Fix formatting 2015-10-19 13:35:46 +02:00
Mark Charlebois 8e82ced5a4 Added backtrace function
Added PX4_BACKTRACE() to display stack trace for debugging

Added backtrace for HRT reschedule with 0 timeout

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-10-19 09:41:49 +02:00
Mark Charlebois 300932bde3 QuRT: fixes to unbreak cmake build for QuRT
Updated DSPAL version.
Fixed missing lib in config.
Fixed heafers for missing timespec definition.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-09-24 15:16:00 -07:00
Lorenz Meier e2332281ad Work queue: Add required POSIX header 2015-09-20 10:58:45 +02:00
Lorenz Meier c1c235edb2 Merge branch 'cmake-2' into cmake-2-pthread 2015-09-20 10:34:03 +02:00
Lorenz Meier 6ef94e0dfb Merged master into cmake-2 2015-09-20 10:33:39 +02:00
Lorenz Meier d73deabf5c Work queues: Move to POSIX semaphore abstraction 2015-09-20 00:27:28 +02:00
Mark Charlebois 3a2e064c92 Fixed error due to set but unused variable
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-09-16 15:58:15 -07:00
Mark Charlebois 7d2ba97511 Fixed poll timeout bug
The SIGCONT signal was being ignored by the HRT queue thread so the
usleep was not waking up early to process new work.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-09-16 15:24:58 -07:00
James Goppert 1d6b31d196 Switch to cmake build system. 2015-09-07 20:37:45 -04:00
Mark Charlebois c1317ad463 POSIX: code format changes
Changed the code format of the files derived from NuttX to match the code
style of PX4.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-30 17:19:55 -07:00
Mark Charlebois a96db1580f Platform cleanup - remove duplicate files
The POSIX and QURT platforms contain several duplicate files.
These files have been factored out into platforms/posix/work_queue.
The config files have been updated to include the
platforms/posix/work_queue module.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-28 20:08:50 -07:00