2021-09-24 05:32:09 +03:00
|
|
|
// Copyright (c) Microsoft Corporation
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
#include "libbpf.h"
|
|
|
|
|
|
|
|
long
|
|
|
|
libbpf_get_error(const void* ptr)
|
|
|
|
{
|
|
|
|
/* Older versions of Linux encode error numbers in a
|
|
|
|
* void* in some cases, so libbpf has to deal with both
|
|
|
|
* that case and the simple case of using errno, so
|
|
|
|
* exposes this API to be agnostic. But we always use
|
|
|
|
* errno, so don't need to look at the ptr value.
|
|
|
|
*/
|
|
|
|
UNREFERENCED_PARAMETER(ptr);
|
|
|
|
|
|
|
|
return -errno;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
libbpf_num_possible_cpus(void)
|
|
|
|
{
|
2022-09-30 20:24:50 +03:00
|
|
|
return GetMaximumProcessorCount(ALL_PROCESSOR_GROUPS);
|
2021-09-24 05:32:09 +03:00
|
|
|
}
|