Benjamin Valentin
b7a5261508
sys/net/grnc/netreg: avoid creating an infinite loop
2023-02-02 17:56:19 +01:00
Marian Buschsieweke
747ee9d56f
sys/net/grnc/netreg: avoid freeing wild pointers
...
When freeing any stale pktsnips from stale messages in the mbox, make
sure that the messages actually contains a pktsnip before freeing.
2022-11-22 17:57:44 +01:00
chrysn
982ec4dcda
gnrc_netreg: Use locks around netreg
...
This eliminates race conditions around unregistering netdevs.
gnrc_netreg_lookup-style functions perform a DEVELHELP check on whether
that lock is held.
2022-10-14 03:35:15 +02:00
Benjamin Valentin
bf5926283b
gnrc_netreg: drain mbox on unregister
...
If there are still messages in the mbox when gnrc_netreg_unregister()
is called, we must release the associated pktbuf snips, otherwise
they are leaked away forever.
E.g. `sock_udp_close()` was called without receiving all messages with
`sock_udp_recv()`.
2022-05-29 22:42:48 +02:00
Marian Buschsieweke
0cb274c1eb
sys/net/gnrc: Fix include of xtimer.h
...
Make sure xtimer.h is only included if the xtimer module is actually used, as
otherwise compilation for the waspmote-pro fails.
2020-09-16 19:55:43 +02:00
Marian Buschsieweke
3b6fa61829
sys: Cleanup access to internal variables
...
Replace direct accesses to sched_active_thread and sched_active_pid with
the helper functions thread_getpid() and thread_get_active(). This serves
two purposes:
1. It makes accidental writes to those variable from outside core less likely.
2. Casting off the volatile qualifier is now well contained to those two
functions
2020-08-24 20:28:11 +02:00
Martine Lenders
a14e33df01
gnrc_netreg: use thread_has_msg_queue() for msg queue check
2018-12-19 15:39:50 +01:00
Martine Lenders
986b9d380b
gnrc_netreg: make message queue check more readable
2018-12-19 15:39:50 +01:00
Martine Lenders
d3d7a49d7a
gnrc_netreg: make message queue requirement more visible
2018-05-29 19:21:48 +02:00
Martine Lenders
467e9548cf
gnrc_netreg: optimize gnrc_netreg_num() to use _netreg_lookup()
2018-02-22 20:39:23 +01:00
Martine Lenders
49f80b7cf1
Revert "gnrc/netreg: remove gnrc_netreg_num"
...
This reverts commit c178ea8798
.
2018-02-22 20:28:32 +01:00
smlng
c178ea8798
gnrc/netreg: remove gnrc_netreg_num
2018-02-06 21:41:19 +01:00
smlng
573b6dc98a
gnrc/netreg: optimize lookup and getnext
2018-02-06 21:37:39 +01:00
smlng
321067b99f
gnrc/netreg: remove unnecessary DEVELHELP condition
2018-01-25 17:01:10 +01:00
Simon Brummer
abd307b89d
gnrc_tcp : initial implementation
2017-01-22 09:27:58 +01:00
Martine Lenders
b84d955921
gnrc_netreg: add mbox support
2016-10-25 21:31:54 +02:00
ec897a868c
core, gnrc_netreg: remove redundant or unneeded clist.h include
2016-07-18 13:17:31 +02:00
Oleg Hahm
cba3ba71ab
gnrc netreg: remove generic hdr build function
2016-03-23 15:20:12 +01:00
Oleg Hahm
991c71cf27
gnrc ipv6: use ipv6_addr_t ptr for hdr_build
2016-03-23 15:20:12 +01:00
Oleg Hahm
fc919ea28e
netreg: assert correct param length for hdr_build
2016-03-23 15:20:12 +01:00
Oleg Hahm
360413a033
gnrc ipv6 hdr: remove len params from hdr_build
2016-03-23 15:20:11 +01:00
Oleg Hahm
487f6e480f
gnrc udp: simplify gnrc_udp_hdr_build
...
Directly using 16 bit port numbers instead of casting uint8_t pointers.
2016-03-23 15:20:11 +01:00
a6498cb165
sys: net: gnrc_netreg: check for msg queue of registered thread, not registering
2015-10-31 11:18:00 +01:00
Oleg Hahm
2e342c7e9b
gnrc netreg: make message queue mandatory
...
Any thread that registers for gnrc events (i.e. incoming packets) must provide a message queue.
2015-10-26 10:54:05 +01:00
Martine Lenders
58ff31bfe9
gnrc: make all gnrc modules sub-modules of gnrc
2015-08-18 23:00:07 +02:00