Files
android/drivers/misc/mediatek/include/mt-plat/task_turbo_futex.h
T
threeeye bc1d038eac REVVL 6 Pro kernel bring-up: full working tree snapshot (2026-09-12)
Squashed backup commit (no shallow-clone history issues) of
xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream
commit 9eece662e) plus all fixes applied to get everpal_defconfig building
clean against a modern (GCC 15.2.0) toolchain -- see the previous commit
message on the lineage-23.2 branch (also in this repo history is not
available here since this is a squashed snapshot; full incremental history
lives in the local DL380 checkout and the upstream GitHub remote).

Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
2026-09-12 13:36:46 +00:00

44 lines
1.1 KiB
C

/*
* Copyright (C) 2019 MediaTek Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef _TASK_TURBO_FUTEX_H_
#define _TASK_TURBO_FUTEX_H_
#include "turbo_common.h"
inline void futex_plist_add(struct futex_q *q, struct futex_hash_bucket *hb)
{
struct futex_q *this, *next;
struct plist_node *current_node = &q->list;
struct plist_node *this_node;
if (!sub_feat_enable(SUB_FEAT_LOCK) &&
!is_turbo_task(current)) {
plist_add(&q->list, &hb->chain);
return;
}
plist_for_each_entry_safe(this, next, &hb->chain, list) {
if ((!this->pi_state || !this->rt_waiter)
&& !is_turbo_task(this->task)) {
this_node = &this->list;
list_add(&current_node->node_list,
this_node->node_list.prev);
return;
}
}
plist_add(&q->list, &hb->chain);
}
#endif