mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-27 23:26:49 +00:00
Revert "router: on linux add a mutex around the queue (#6709)" (#6726)
Some checks failed
CI / setup (check) (push) Waiting to run
CI / setup (esp32) (push) Waiting to run
CI / setup (esp32c3) (push) Waiting to run
CI / setup (esp32c6) (push) Waiting to run
CI / setup (esp32s3) (push) Waiting to run
CI / setup (nrf52840) (push) Waiting to run
CI / setup (rp2040) (push) Waiting to run
CI / setup (stm32) (push) Waiting to run
CI / check (push) Blocked by required conditions
CI / build-esp32 (push) Blocked by required conditions
CI / build-esp32-s3 (push) Blocked by required conditions
CI / build-esp32-c3 (push) Blocked by required conditions
CI / build-esp32-c6 (push) Blocked by required conditions
CI / build-nrf52 (push) Blocked by required conditions
CI / build-rpi2040 (push) Blocked by required conditions
CI / build-stm32 (push) Blocked by required conditions
CI / build-debian-src (push) Waiting to run
CI / package-pio-deps-native-tft (push) Waiting to run
CI / test-native (push) Waiting to run
CI / docker-deb-amd64 (push) Waiting to run
CI / docker-deb-amd64-tft (push) Waiting to run
CI / docker-alp-amd64 (push) Waiting to run
CI / docker-alp-amd64-tft (push) Waiting to run
CI / docker-deb-arm64 (push) Has been cancelled
CI / docker-deb-armv7 (push) Has been cancelled
CI / gather-artifacts (esp32) (push) Has been cancelled
CI / gather-artifacts (esp32c3) (push) Has been cancelled
CI / gather-artifacts (esp32c6) (push) Has been cancelled
CI / gather-artifacts (esp32s3) (push) Has been cancelled
CI / gather-artifacts (nrf52840) (push) Has been cancelled
CI / gather-artifacts (rp2040) (push) Has been cancelled
CI / gather-artifacts (stm32) (push) Has been cancelled
CI / release-artifacts (push) Has been cancelled
CI / release-firmware (esp32) (push) Has been cancelled
CI / release-firmware (esp32c3) (push) Has been cancelled
CI / release-firmware (esp32c6) (push) Has been cancelled
CI / release-firmware (esp32s3) (push) Has been cancelled
CI / release-firmware (nrf52840) (push) Has been cancelled
CI / release-firmware (rp2040) (push) Has been cancelled
CI / release-firmware (stm32) (push) Has been cancelled
CI / publish-firmware (push) Has been cancelled
Semgrep Full Scan / semgrep-full (push) Has been cancelled
Some checks failed
CI / setup (check) (push) Waiting to run
CI / setup (esp32) (push) Waiting to run
CI / setup (esp32c3) (push) Waiting to run
CI / setup (esp32c6) (push) Waiting to run
CI / setup (esp32s3) (push) Waiting to run
CI / setup (nrf52840) (push) Waiting to run
CI / setup (rp2040) (push) Waiting to run
CI / setup (stm32) (push) Waiting to run
CI / check (push) Blocked by required conditions
CI / build-esp32 (push) Blocked by required conditions
CI / build-esp32-s3 (push) Blocked by required conditions
CI / build-esp32-c3 (push) Blocked by required conditions
CI / build-esp32-c6 (push) Blocked by required conditions
CI / build-nrf52 (push) Blocked by required conditions
CI / build-rpi2040 (push) Blocked by required conditions
CI / build-stm32 (push) Blocked by required conditions
CI / build-debian-src (push) Waiting to run
CI / package-pio-deps-native-tft (push) Waiting to run
CI / test-native (push) Waiting to run
CI / docker-deb-amd64 (push) Waiting to run
CI / docker-deb-amd64-tft (push) Waiting to run
CI / docker-alp-amd64 (push) Waiting to run
CI / docker-alp-amd64-tft (push) Waiting to run
CI / docker-deb-arm64 (push) Has been cancelled
CI / docker-deb-armv7 (push) Has been cancelled
CI / gather-artifacts (esp32) (push) Has been cancelled
CI / gather-artifacts (esp32c3) (push) Has been cancelled
CI / gather-artifacts (esp32c6) (push) Has been cancelled
CI / gather-artifacts (esp32s3) (push) Has been cancelled
CI / gather-artifacts (nrf52840) (push) Has been cancelled
CI / gather-artifacts (rp2040) (push) Has been cancelled
CI / gather-artifacts (stm32) (push) Has been cancelled
CI / release-artifacts (push) Has been cancelled
CI / release-firmware (esp32) (push) Has been cancelled
CI / release-firmware (esp32c3) (push) Has been cancelled
CI / release-firmware (esp32c6) (push) Has been cancelled
CI / release-firmware (esp32s3) (push) Has been cancelled
CI / release-firmware (nrf52840) (push) Has been cancelled
CI / release-firmware (rp2040) (push) Has been cancelled
CI / release-firmware (stm32) (push) Has been cancelled
CI / publish-firmware (push) Has been cancelled
Semgrep Full Scan / semgrep-full (push) Has been cancelled
This reverts commit 987623567a
.
This commit is contained in:
parent
10693c4569
commit
152b8b1b02
@ -64,10 +64,6 @@ Router::Router() : concurrency::OSThread("Router"), fromRadioQueue(MAX_RX_FROMRA
|
|||||||
*/
|
*/
|
||||||
int32_t Router::runOnce()
|
int32_t Router::runOnce()
|
||||||
{
|
{
|
||||||
#ifdef ARCH_PORTDUINO
|
|
||||||
const std::lock_guard<std::mutex> lock(queueMutex);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
meshtastic_MeshPacket *mp;
|
meshtastic_MeshPacket *mp;
|
||||||
while ((mp = fromRadioQueue.dequeuePtr(0)) != NULL) {
|
while ((mp = fromRadioQueue.dequeuePtr(0)) != NULL) {
|
||||||
// printPacket("handle fromRadioQ", mp);
|
// printPacket("handle fromRadioQ", mp);
|
||||||
@ -84,10 +80,6 @@ int32_t Router::runOnce()
|
|||||||
*/
|
*/
|
||||||
void Router::enqueueReceivedMessage(meshtastic_MeshPacket *p)
|
void Router::enqueueReceivedMessage(meshtastic_MeshPacket *p)
|
||||||
{
|
{
|
||||||
#ifdef ARCH_PORTDUINO
|
|
||||||
const std::lock_guard<std::mutex> lock(queueMutex);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Try enqueue until successful
|
// Try enqueue until successful
|
||||||
while (!fromRadioQueue.enqueue(p, 0)) {
|
while (!fromRadioQueue.enqueue(p, 0)) {
|
||||||
meshtastic_MeshPacket *old_p;
|
meshtastic_MeshPacket *old_p;
|
||||||
|
@ -8,9 +8,6 @@
|
|||||||
#include "PointerQueue.h"
|
#include "PointerQueue.h"
|
||||||
#include "RadioInterface.h"
|
#include "RadioInterface.h"
|
||||||
#include "concurrency/OSThread.h"
|
#include "concurrency/OSThread.h"
|
||||||
#ifdef ARCH_PORTDUINO
|
|
||||||
#include <mutex>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A mesh aware router that supports multiple interfaces.
|
* A mesh aware router that supports multiple interfaces.
|
||||||
@ -22,12 +19,6 @@ class Router : protected concurrency::OSThread, protected PacketHistory
|
|||||||
/// forwarded to the phone.
|
/// forwarded to the phone.
|
||||||
PointerQueue<meshtastic_MeshPacket> fromRadioQueue;
|
PointerQueue<meshtastic_MeshPacket> fromRadioQueue;
|
||||||
|
|
||||||
#ifdef ARCH_PORTDUINO
|
|
||||||
/// linux calls enqueueReceivedMessage from an other thread when receiving UDP packets,
|
|
||||||
/// to avoid a data race with LoRa, lock that method.
|
|
||||||
std::mutex queueMutex;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
RadioInterface *iface = NULL;
|
RadioInterface *iface = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user