open-cas-linux/casadm/psort.h
Rafal Stefanowski 43f43068ad Update copyright statements (2021)
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2021-01-21 13:15:38 +01:00

23 lines
478 B
C

/*
* Copyright(c) 2012-2021 Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
#ifndef PSORT_H
#define PSORT_H
typedef int (*compar_t)(const void *, const void *);
/**
* function does exactly the same thing as qsort, except, that it sorts
* using many CPU cores, not just one.
*
* number of CPU cores is configured as half of the number of online
* CPUs in the system.
*/
void psort(void *base, size_t nmemb, size_t size,
compar_t compar);
#endif