this repo has no description
at fixPythonPipStalling 45 lines 1.2 kB view raw
1/* 2 * Darling - pmenergy & pmsample stub 3 * Copyright (c) 2018 Lubos Dolezel, All rights reserved. 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 3.0 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library. 17 */ 18 19#ifndef _PMSAMPLE_H 20#define _PMSAMPLE_H 21 22#include <stdint.h> 23#include <pmenergy.h> 24#include <mach/mach.h> 25#include <unistd.h> 26 27#ifdef __cplusplus 28extern "C" { 29#endif 30 31// These constants are made up!!! 32#define PM_SAMPLE_ALL 0xffffffff 33#define PM_SAMPLE_NAME 1 34#define PM_SAMPLE_INTERVAL 2 35#define PM_SAMPLE_CPU 4 36#define PM_SAMPLE_DISK 8 37 38int pm_sample_task_and_pid(task_t task, pid_t pid, pm_task_energy_data_t* pme, uint64_t mach_time, unsigned int flags); 39 40#ifdef __cplusplus 41} 42#endif 43 44#endif 45