Commit Graph
105 Commits
Author SHA1 Message Date
andrey 1db0dfea43 Merge branch 'master' into pico_sdk 2026-08-11 18:21:50 +03:00
andrey fd578ea927 fix: address review issues from MICRO_PIP migration
- piconditionvar.h: remove phantom wait(lk, timeout) stubs not in real class
- pithread.h: remove duplicate #ifndef PIP_NO_THREADS guard
- piscreendrawer/tile/tiles.cpp: remove duplicate #if !defined(PICO_SDK)
- cmake/FindPIP.cmake: replace PIP_MICRO with PIP_EMBEDDED
2026-08-11 15:26:55 +03:00
andrey 4d8b743075 refactor: migrate MICRO_PIP to fine-grained feature flags
Replace monolithic MICRO_PIP/PIP_MICRO with granular flags:

Feature flags (CMake options + platform auto-detection):
- PIP_NO_FILESYSTEM, PIP_NO_THREADS, PIP_NO_SOCKET
- PIP_NO_PROCESS, PIP_NO_DYNLIB, PIP_NO_FFT, PIP_NO_SERIAL

Embedded optimization flag:
- PIP_EMBEDDED (auto-set for Pico SDK and FreeRTOS)
  Controls buffer sizes, time stubs, terminal fallback, init stubs

Platform blocks in CMakeLists.txt:
- Pico SDK: auto-disables FS, PROCESS, DYNLIB, FFT, SERIAL;
  conditionally disables THREADS (no FreeRTOS) and SOCKET (no LWIP)
- FreeRTOS: auto-disables FS, PROCESS, DYNLIB, FFT, SERIAL;
  conditionally disables SOCKET (no LWIP)
- Android: auto-disables PROCESS, DYNLIB, FFT

Updated 96 files across libs/, utils/, tests/, and CMakeLists.txt.
Builds verified for Linux (547 tests pass) and Pico SDK (100%).
Removed all MICRO_PIP and PIP_MICRO references (0 remaining).
2026-08-11 14:34:59 +03:00
andrey 5e4a55cc0c fix(PIThread): remove spurious unlock() in _waitForFinish
The function called unlock() on thread_mutex without a matching
lock(), causing UB on Windows (releasing an unowned critical
section) or silently dropping a user-held lock.
2026-08-06 17:01:30 +03:00
andrey 31ae52623d fix(PIConditionVariable): clamp negative timeout in waitFor
When elapsed time exceeded the timeout, the remaining milliseconds
expression went negative and was implicitly converted to DWORD,
wrapping to ~0xFFFFFFFF (5 days) — effectively INFINITE.
Now clamps to 0 and returns false when time has elapsed.
2026-08-06 17:01:30 +03:00
andrey 4e7a5d58aa Merge branch 'master' into pico_sdk 2026-03-29 12:28:36 +03:00
andrey a450235743 PIP_NO_FILESYSTEM and PIP_NO_THREADS 2026-03-29 12:22:35 +03:00
peri4 a16f629dc5 PIThreadPoolWorker ready to use 2026-03-25 10:59:32 +03:00
peri4 5868e0ec9d work with PIThreadPoolWorker 2026-03-24 19:56:43 +03:00
peri4 3102b985d5 add new PIThreadPoolWorker - rework of PIThreadPoolExecutor 2026-03-24 14:09:41 +03:00
andrey 96c22e1184 move std function 2026-03-20 16:31:30 +03:00
andrey 4537e40832 Merge branch 'master' into pitimer_slot 2026-03-20 15:35:34 +03:00
andrey 6efe77a395 add move 2026-03-20 13:46:31 +03:00
andrey 6cfc4524f0 PITimer slot optimize 2026-03-20 13:19:55 +03:00
andrey ac415ebbb6 revert can_unlock flag 2026-03-18 08:54:06 +03:00
andrey e761625eab using recursive mutex 2026-03-17 19:14:14 +03:00
andrey 9f57f0107e remove picout 2026-03-17 18:34:48 +03:00
andrey ac877f1024 fixes 2026-03-17 18:13:23 +03:00
andrey 8ccc05ee78 simplify piprotectedvariable 2026-03-17 17:33:27 +03:00
peri4 ed13838237 merged AI doc, some new pages 2026-03-12 14:46:57 +03:00
peri4 e57719c118 version 4.7.2
PIThreadPoolLoop reworked, now threads starts on constructor and immediately run after start()
2025-06-07 10:58:11 +03:00
peri4 d01baffb0b PITimeMeasurer remove some API, add elapsedAndReset()
got rid off some warnings
2025-01-17 11:49:24 +03:00
peri4 82cda42e75 change last logic to PIThreadNotifier 2025-01-15 18:38:50 +03:00
peri4 5755d172cd fallback to min_sleep 2025-01-15 18:25:32 +03:00
peri4 0dd47f50a0 version 4.6.0
PIThreadNotifier::waitFor() new method
PIThread::waitForFinish() now use condvar to exit as soon as possible
2025-01-15 17:57:16 +03:00
peri4 60d2a83df5 android (maybe some other *nix) fix 2025-01-10 20:46:33 +03:00
peri4 15548de79c version 4.5.0
PIThread::stopAndWait now returns bool
PIKbdListener on Linux now use piwaitevent_p and can immediately stop
new base method piZeroMemory, also migrate all "memset 0" to piZeroMemory
2024-12-29 11:48:24 +03:00
peri4 49713ddc57 PIThread now setup itself in thread func 2024-12-29 10:50:38 +03:00
peri4 64025e0399 PIThread now wait on _endThread() when starting is really done 2024-12-26 16:01:56 +03:00
peri4 6e5556969d fix for last commit 2024-12-25 19:37:55 +03:00
peri4 b50eeaef46 fix for last commit 2024-12-25 19:34:49 +03:00
peri4 ffc471359a fix thread name for linux 2024-12-25 19:30:15 +03:00
peri4 caa7880cc4 get rid of piForeach
apply some code analyzer recommendations
ICU flag now check if libicu exists
prepare for more accurate growth of containers (limited PoT, then constantly increase size)
2024-11-20 20:01:47 +03:00
peri4 c9a5ddd89f PIProtectedVariable - user now can`t mistake
PIHTTPServer improvements
2024-11-18 11:11:19 +03:00
peri4 cdde340efe add microhttpd server 2024-11-14 18:15:27 +03:00
peri4 0840d807a0 add PIReadWriteLock, PIReadLocker and PIWriteLocker 2024-11-13 13:56:16 +03:00
peri4 4655d72554 new class PISemaphore
doc for PIProtectedVariable
2024-11-12 18:50:22 +03:00
peri4 5b066cbc27 add PIProtectedVariable 2024-11-10 21:28:59 +03:00
peri4 57f8c1313e first release of translation facility
* runtime - loading and translating
 * design-time - works with *.ts file (pip_tr utility)
 * compile-time - CMake macro for compile *.ts
2024-11-05 13:49:00 +03:00
peri4 bdd18b614f PIEthernet more accuracy construct
PIThread windows fix
2024-09-17 16:11:18 +03:00
peri4 e186e0adff shorter thread names 2024-09-17 15:58:06 +03:00
peri4 f105f616f6 PIThread more accurate end, PIEthernet tcpserver client no reinit 2024-09-17 13:22:20 +03:00
peri4 996b7ea403 important:
* PIThread::~PIThread() now unregister itself from introspection, if terminates than show warning
 * PISystemMonitor now correctly stops
 * PIPeer now can correctly stopAndWait
 * PIPeer::destroy(), protected method for close all eths and threads
 * new PIINTROSPECTION_STOP macro
 * Introspection now can be correctly stopped by macro, more safety

ClientServer:
 * ClientBase::close() stop and disconnect channel
 * Server clients clean-up now event-based
 * No warnings on client destructor
2024-09-12 17:07:48 +03:00
peri4 e6c8714857 version 4.1.0
maybe fix hang on PIEthernet::interrupt()
replace piLetobe with piChangeEndian:
 * piChangeEndianBinary
 * piChangeBinary
 * piChangedBinary
PIDiagnostics::start now accept PISystemTime instead of number
add PITimer::start(PISystemTime, std::function<void()>) overload
2024-08-28 11:56:36 +03:00
peri4 1c7fc39b6c version 4.0.0_alpha
in almost all methods removed timeouts in milliseconds, replaced to PISystemTime
PITimer rewrite, remove internal impl, now only thread implementation, API similar to PIThread
PITimer API no longer pass void*
PIPeer, PIConnection improved stability on reinit and exit
PISystemTime new methods
pisd now exit without hanging
2024-07-30 14:18:02 +03:00
peri4 b781bd5148 PIBroadcast fix 2024-07-10 16:56:40 +03:00
peri4 903b320629 version 3.21.0
add PISystemTime overload for thread/timer/io classes
2024-07-09 16:32:27 +03:00
peri4 35aadb0e78 doc and brush 2023-07-04 13:08:37 +03:00
peri4 ccae1a7311 more literals, use some in PIP, small refactor PIThread::start (clang-format mistakes) 2023-07-02 14:02:10 +03:00
peri4 c2b8a8d6da code format 2022-12-14 14:13:52 +03:00