mirror of
https://review.haiku-os.org/haiku
synced 2025-01-18 12:38:51 +01:00
kernel/util: Require passing a list_link to list_remove_link.
If something other than a list_link is passed, an explicit cast will now be needed. No functional change intended.
This commit is contained in:
parent
7d232f0cf8
commit
7331a67227
@ -54,7 +54,7 @@ extern void list_init(struct list *list);
|
|||||||
extern void list_init_etc(struct list *list, int32 offset);
|
extern void list_init_etc(struct list *list, int32 offset);
|
||||||
extern void list_add_link_to_head(struct list *list, void *_link);
|
extern void list_add_link_to_head(struct list *list, void *_link);
|
||||||
extern void list_add_link_to_tail(struct list *list, void *_link);
|
extern void list_add_link_to_tail(struct list *list, void *_link);
|
||||||
extern void list_remove_link(void *_link);
|
extern void list_remove_link(struct list_link *_link);
|
||||||
extern void *list_get_next_item(struct list *list, void *item);
|
extern void *list_get_next_item(struct list *list, void *item);
|
||||||
extern void *list_get_prev_item(struct list *list, void *item);
|
extern void *list_get_prev_item(struct list *list, void *item);
|
||||||
extern void *list_get_last_item(struct list *list);
|
extern void *list_get_last_item(struct list *list);
|
||||||
|
@ -339,7 +339,7 @@ NodeMonitorService::_RemoveListener(monitor_listener *listener)
|
|||||||
|
|
||||||
// remove it from the listener and I/O context lists
|
// remove it from the listener and I/O context lists
|
||||||
monitor->listeners.Remove(listener);
|
monitor->listeners.Remove(listener);
|
||||||
list_remove_link(listener);
|
list_remove_link(&listener->context_link);
|
||||||
|
|
||||||
if (dynamic_cast<UserNodeListener*>(listener->listener) != NULL) {
|
if (dynamic_cast<UserNodeListener*>(listener->listener) != NULL) {
|
||||||
// This is a listener we copied ourselves in UpdateUserListener(),
|
// This is a listener we copied ourselves in UpdateUserListener(),
|
||||||
|
@ -2604,7 +2604,7 @@ wait_for_thread_etc(thread_id id, uint32 flags, bigtime_t timeout,
|
|||||||
// remove our death entry now.
|
// remove our death entry now.
|
||||||
thread = Thread::GetAndLock(id);
|
thread = Thread::GetAndLock(id);
|
||||||
if (thread != NULL) {
|
if (thread != NULL) {
|
||||||
list_remove_link(&death);
|
list_remove_link(&death.link);
|
||||||
thread->UnlockAndReleaseReference();
|
thread->UnlockAndReleaseReference();
|
||||||
} else {
|
} else {
|
||||||
// The thread is already gone, so we need to wait uninterruptibly
|
// The thread is already gone, so we need to wait uninterruptibly
|
||||||
|
@ -81,10 +81,8 @@ list_add_link_to_tail(struct list *list, void *_link)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
list_remove_link(void *_link)
|
list_remove_link(list_link *link)
|
||||||
{
|
{
|
||||||
list_link *link = (list_link *)_link;
|
|
||||||
|
|
||||||
link->next->prev = link->prev;
|
link->next->prev = link->prev;
|
||||||
link->prev->next = link->next;
|
link->prev->next = link->next;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user