qcacmn: Add QDF API to set thread cpu mask
Add QDF API to set cpu mask - qdf_thread_set_cpus_allowed_ptr. Linux version of this API is implemented using set_cpus_allowed_ptr linux API. Change-Id: I3122e2b30c6d3f02e9c874c19db610e5f09ec064 CRs-Fixed: 2474323
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2019 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
|
||||
@@ -134,4 +134,13 @@ int qdf_get_current_pid(void);
|
||||
*/
|
||||
const char *qdf_get_current_comm(void);
|
||||
|
||||
/**
|
||||
* qdf_thread_set_cpus_allowed_mask() - set cpu mask for a particular thread
|
||||
* @thread: thread for which new cpu mask is set
|
||||
* @new_mask: new cpu mask to be set for the thread
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void
|
||||
qdf_thread_set_cpus_allowed_mask(qdf_thread_t *thread, qdf_cpu_mask *new_mask);
|
||||
#endif /* __QDF_THREADS_H */
|
||||
|
@@ -157,6 +157,11 @@ typedef __qdf_dma_context_t qdf_dma_context_t;
|
||||
typedef __qdf_mem_info_t qdf_mem_info_t;
|
||||
typedef __sgtable_t sgtable_t;
|
||||
|
||||
/**
|
||||
* typepdef qdf_cpu_mask - CPU Mask
|
||||
*/
|
||||
typedef __qdf_cpu_mask qdf_cpu_mask;
|
||||
|
||||
/**
|
||||
* pointer to net device
|
||||
*/
|
||||
|
@@ -156,6 +156,7 @@ typedef dma_addr_t __qdf_dma_addr_t;
|
||||
typedef size_t __qdf_dma_size_t;
|
||||
typedef dma_addr_t __qdf_dma_context_t;
|
||||
typedef struct net_device *__qdf_netdev_t;
|
||||
typedef struct cpumask __qdf_cpu_mask;
|
||||
typedef __le16 __qdf_le16_t;
|
||||
typedef __le32 __qdf_le32_t;
|
||||
typedef __le64 __qdf_le64_t;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2019 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
|
||||
@@ -228,3 +228,11 @@ const char *qdf_get_current_comm(void)
|
||||
return current->comm;
|
||||
}
|
||||
qdf_export_symbol(qdf_get_current_comm);
|
||||
|
||||
void
|
||||
qdf_thread_set_cpus_allowed_mask(qdf_thread_t *thread, qdf_cpu_mask *new_mask)
|
||||
{
|
||||
set_cpus_allowed_ptr(thread, new_mask);
|
||||
}
|
||||
|
||||
qdf_export_symbol(qdf_thread_set_cpus_allowed_mask);
|
||||
|
Reference in New Issue
Block a user