We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b53d697 commit fddcfa7Copy full SHA for fddcfa7
doc/subsystems/networking/connectivity-example-app.c
@@ -18,16 +18,16 @@ struct sockaddr_in6 my_addr6 = { 0 };
18
struct net_context *context;
19
int ret;
20
21
-struct nano_sem quit_lock;
+struct k_sem waiter;
22
23
static inline void quit(void)
24
{
25
- nano_sem_give(&quit_lock);
+ k_sem_give(&waiter);
26
}
27
28
static inline void init_app(void)
29
30
- nano_sem_init(&quit_lock);
+ k_sem_init(&waiter, 0, 1);
31
32
/* Add our address to the network interface */
33
net_if_ipv6_addr_add(net_if_get_default(), &in6addr_my,
@@ -46,7 +46,7 @@ void main(void)
46
47
receive_data();
48
49
- nano_sem_take(&quit_lock, TICKS_UNLIMITED);
+ k_sem_take(&waiter, K_FOREVER);
50
51
close_context();
52
0 commit comments