diff --git a/qdf/inc/qdf_threads.h b/qdf/inc/qdf_threads.h index fcb28c8bea..5a89f13ada 100644 --- a/qdf/inc/qdf_threads.h +++ b/qdf/inc/qdf_threads.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -168,4 +168,24 @@ void qdf_cpumask_set_cpu(unsigned int cpu, qdf_cpu_mask *dstp); * Return: None */ void qdf_cpumask_setall(qdf_cpu_mask *dstp); + +/** + * qdf_cpumask_empty - Check if cpu_mask is empty + * @srcp: cpumask pointer + * + * Return: true or false + * + */ +bool qdf_cpumask_empty(const qdf_cpu_mask *srcp); + +/** + * qdf_cpumask_copy - Copy srcp cpumask to dstp + * @srcp: source cpumask pointer + * @dstp: destination cpumask pointer + * + * Return: None + * + */ +void qdf_cpumask_copy(qdf_cpu_mask *dstp, + const qdf_cpu_mask *srcp); #endif /* __QDF_THREADS_H */ diff --git a/qdf/linux/src/qdf_threads.c b/qdf/linux/src/qdf_threads.c index 43bfe0cba3..7f32ccd350 100644 --- a/qdf/linux/src/qdf_threads.c +++ b/qdf/linux/src/qdf_threads.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -278,3 +278,18 @@ void qdf_cpumask_setall(qdf_cpu_mask *dstp) } qdf_export_symbol(qdf_cpumask_setall); + +bool qdf_cpumask_empty(const qdf_cpu_mask *srcp) +{ + return cpumask_empty(srcp); +} + +qdf_export_symbol(qdf_cpumask_empty); + +void qdf_cpumask_copy(qdf_cpu_mask *dstp, + const qdf_cpu_mask *srcp) +{ + return cpumask_copy(dstp, srcp); +} + +qdf_export_symbol(qdf_cpumask_copy);