Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xcap
xcap-capability-linux
Commits
813caf8d
Commit
813caf8d
authored
May 15, 2017
by
Vikram Narayanan
Browse files
lcd/nullnet: Switch to waitqueue
Signed-off-by:
Vikram Narayanan
<
vikram186@gmail.com
>
parent
764aae8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
lcd-domains/test_mods/nullnet/boot/main.c
View file @
813caf8d
...
...
@@ -129,6 +129,9 @@ fail1:
return
ret
;
}
static
DECLARE_WAIT_QUEUE_HEAD
(
wq
);
static
int
shutdown
=
0
;
int
boot_lcd_thread
(
void
*
data
)
{
static
unsigned
once
=
0
;
...
...
@@ -140,14 +143,14 @@ int boot_lcd_thread(void *data)
});
}
once
=
1
;
schedule
(
);
wait_event_interruptible
(
wq
,
shutdown
!=
0
);
}
LIBLCD_MSG
(
"Exiting thread"
);
lcd_cap_delete
(
dummy_lcd
);
lcd_destroy_create_ctx
(
dummy_ctx
);
if
(
current
->
lcd
)
lcd_cap_delete
(
dummy_lcd
);
if
(
dummy_ctx
)
lcd_destroy_create_ctx
(
dummy_ctx
);
msleep
(
10000
);
lcd_destroy_module_klcd
(
net_klcd
,
"lcd_test_mod_nullnet_net_klcd"
);
lcd_exit
(
0
);
return
0
;
}
...
...
@@ -170,6 +173,8 @@ static void boot_exit(void)
/* nothing to do */
if
(
!
IS_ERR
(
boot_task
))
{
LIBLCD_MSG
(
"%s: exiting"
,
__func__
);
shutdown
=
1
;
wake_up_interruptible
(
&
wq
);
kthread_stop
(
boot_task
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment