Vendor import of compiler-rt release_90 branch r369369:
https://llvm.org/svn/llvm-project/compiler-rt/branches/release_90@369369
This commit is contained in:
parent
8f3cadc28c
commit
f6479ce7c6
@ -39,8 +39,8 @@ void AsanOnDeadlySignal(int signo, void *siginfo, void *context) {
|
||||
|
||||
// ---------------------- TSD ---------------- {{{1
|
||||
|
||||
#if SANITIZER_NETBSD || SANITIZER_FREEBSD
|
||||
// Thread Static Data cannot be used in early init on NetBSD and FreeBSD.
|
||||
#if SANITIZER_NETBSD && !ASAN_DYNAMIC
|
||||
// Thread Static Data cannot be used in early static ASan init on NetBSD.
|
||||
// Reuse the Asan TSD API for compatibility with existing code
|
||||
// with an alternative implementation.
|
||||
|
||||
|
@ -543,7 +543,7 @@ static void getAvailableFeatures(unsigned ECX, unsigned EDX, unsigned MaxLeaf,
|
||||
setFeature(FEATURE_BMI);
|
||||
if (HasLeaf7 && ((EBX >> 5) & 1) && HasAVX)
|
||||
setFeature(FEATURE_AVX2);
|
||||
if (HasLeaf7 && ((EBX >> 9) & 1))
|
||||
if (HasLeaf7 && ((EBX >> 8) & 1))
|
||||
setFeature(FEATURE_BMI2);
|
||||
if (HasLeaf7 && ((EBX >> 16) & 1) && HasAVX512Save)
|
||||
setFeature(FEATURE_AVX512F);
|
||||
|
@ -33,7 +33,7 @@ static int StrCmp(const char *s1, const char *s2) {
|
||||
}
|
||||
#endif
|
||||
|
||||
static void *GetFuncAddr(const char *name, uptr wrapper_addr) {
|
||||
static void *GetFuncAddr(const char *name) {
|
||||
#if SANITIZER_NETBSD
|
||||
// FIXME: Find a better way to handle renames
|
||||
if (StrCmp(name, "sigaction"))
|
||||
@ -47,18 +47,13 @@ static void *GetFuncAddr(const char *name, uptr wrapper_addr) {
|
||||
// want the address of the real definition, though, so look it up using
|
||||
// RTLD_DEFAULT.
|
||||
addr = dlsym(RTLD_DEFAULT, name);
|
||||
|
||||
// In case `name' is not loaded, dlsym ends up finding the actual wrapper.
|
||||
// We don't want to intercept the wrapper and have it point to itself.
|
||||
if ((uptr)addr == wrapper_addr)
|
||||
addr = nullptr;
|
||||
}
|
||||
return addr;
|
||||
}
|
||||
|
||||
bool InterceptFunction(const char *name, uptr *ptr_to_real, uptr func,
|
||||
uptr wrapper) {
|
||||
void *addr = GetFuncAddr(name, wrapper);
|
||||
void *addr = GetFuncAddr(name);
|
||||
*ptr_to_real = (uptr)addr;
|
||||
return addr && (func == wrapper);
|
||||
}
|
||||
|
@ -174,8 +174,8 @@ void InstallAtExitHandler() {
|
||||
|
||||
// ---------------------- TSD ---------------- {{{1
|
||||
|
||||
#if SANITIZER_NETBSD || SANITIZER_FREEBSD
|
||||
// Thread Static Data cannot be used in early init on NetBSD and FreeBSD.
|
||||
#if SANITIZER_NETBSD
|
||||
// Thread Static Data cannot be used in early init on NetBSD.
|
||||
// Reuse the MSan TSD API for compatibility with existing code
|
||||
// with an alternative implementation.
|
||||
|
||||
|
@ -24,7 +24,7 @@ struct ioctl_desc {
|
||||
const char *name;
|
||||
};
|
||||
|
||||
const unsigned ioctl_table_max = 1200;
|
||||
const unsigned ioctl_table_max = 1236;
|
||||
static ioctl_desc ioctl_table[ioctl_table_max];
|
||||
static unsigned ioctl_table_size = 0;
|
||||
|
||||
@ -645,7 +645,7 @@ static void ioctl_table_fill() {
|
||||
_(SPKRTUNE, NONE, 0);
|
||||
_(SPKRGETVOL, WRITE, sizeof(unsigned int));
|
||||
_(SPKRSETVOL, READ, sizeof(unsigned int));
|
||||
#if 0 /* WIP */
|
||||
#if defined(__x86_64__)
|
||||
/* Entries from file: dev/nvmm/nvmm_ioctl.h */
|
||||
_(NVMM_IOC_CAPABILITY, WRITE, struct_nvmm_ioc_capability_sz);
|
||||
_(NVMM_IOC_MACHINE_CREATE, READWRITE, struct_nvmm_ioc_machine_create_sz);
|
||||
@ -661,7 +661,11 @@ static void ioctl_table_fill() {
|
||||
_(NVMM_IOC_GPA_UNMAP, READ, struct_nvmm_ioc_gpa_unmap_sz);
|
||||
_(NVMM_IOC_HVA_MAP, READ, struct_nvmm_ioc_hva_map_sz);
|
||||
_(NVMM_IOC_HVA_UNMAP, READ, struct_nvmm_ioc_hva_unmap_sz);
|
||||
_(NVMM_IOC_CTL, READ, struct_nvmm_ioc_ctl_sz);
|
||||
#endif
|
||||
/* Entries from file: dev/spi/spi_io.h */
|
||||
_(SPI_IOCTL_CONFIGURE, READ, struct_spi_ioctl_configure_sz);
|
||||
_(SPI_IOCTL_TRANSFER, READ, struct_spi_ioctl_transfer_sz);
|
||||
/* Entries from file: fs/autofs/autofs_ioctl.h */
|
||||
_(AUTOFSREQUEST, WRITE, struct_autofs_daemon_request_sz);
|
||||
_(AUTOFSDONE, READ, struct_autofs_daemon_done_sz);
|
||||
@ -895,6 +899,9 @@ static void ioctl_table_fill() {
|
||||
_(AUDIO_GETBUFINFO, WRITE, struct_audio_info_sz);
|
||||
_(AUDIO_SETCHAN, READ, sizeof(int));
|
||||
_(AUDIO_GETCHAN, WRITE, sizeof(int));
|
||||
_(AUDIO_QUERYFORMAT, READWRITE, struct_audio_format_query_sz);
|
||||
_(AUDIO_GETFORMAT, WRITE, struct_audio_info_sz);
|
||||
_(AUDIO_SETFORMAT, READ, struct_audio_info_sz);
|
||||
_(AUDIO_MIXER_READ, READWRITE, struct_mixer_ctrl_sz);
|
||||
_(AUDIO_MIXER_WRITE, READWRITE, struct_mixer_ctrl_sz);
|
||||
_(AUDIO_MIXER_DEVINFO, READWRITE, struct_mixer_devinfo_sz);
|
||||
@ -985,6 +992,7 @@ static void ioctl_table_fill() {
|
||||
_(DIOCMWEDGES, WRITE, sizeof(int));
|
||||
_(DIOCGSECTORSIZE, WRITE, sizeof(unsigned int));
|
||||
_(DIOCGMEDIASIZE, WRITE, sizeof(uptr));
|
||||
_(DIOCRMWEDGES, WRITE, sizeof(int));
|
||||
/* Entries from file: sys/drvctlio.h */
|
||||
_(DRVDETACHDEV, READ, struct_devdetachargs_sz);
|
||||
_(DRVRESCANBUS, READ, struct_devrescanargs_sz);
|
||||
@ -1206,6 +1214,8 @@ static void ioctl_table_fill() {
|
||||
_(SIOCGETHERCAP, READWRITE, struct_eccapreq_sz);
|
||||
_(SIOCGIFINDEX, READWRITE, struct_ifreq_sz);
|
||||
_(SIOCSETHERCAP, READ, struct_eccapreq_sz);
|
||||
_(SIOCSIFDESCR, READ, struct_ifreq_sz);
|
||||
_(SIOCGIFDESCR, READWRITE, struct_ifreq_sz);
|
||||
_(SIOCGUMBINFO, READWRITE, struct_ifreq_sz);
|
||||
_(SIOCSUMBPARAM, READ, struct_ifreq_sz);
|
||||
_(SIOCGUMBPARAM, READWRITE, struct_ifreq_sz);
|
||||
@ -1335,6 +1345,21 @@ static void ioctl_table_fill() {
|
||||
_(WDOGIOC_TICKLE, NONE, 0);
|
||||
_(WDOGIOC_GTICKLER, WRITE, sizeof(int));
|
||||
_(WDOGIOC_GWDOGS, READWRITE, struct_wdog_conf_sz);
|
||||
/* Entries from file: sys/kcov.h */
|
||||
_(KCOV_IOC_SETBUFSIZE, READ, sizeof(u64));
|
||||
_(KCOV_IOC_ENABLE, READ, sizeof(int));
|
||||
_(KCOV_IOC_DISABLE, NONE, 0);
|
||||
/* Entries from file: sys/ipmi.h */
|
||||
_(IPMICTL_RECEIVE_MSG_TRUNC, READWRITE, struct_ipmi_recv_sz);
|
||||
_(IPMICTL_RECEIVE_MSG, READWRITE, struct_ipmi_recv_sz);
|
||||
_(IPMICTL_SEND_COMMAND, READ, struct_ipmi_req_sz);
|
||||
_(IPMICTL_REGISTER_FOR_CMD, READ, struct_ipmi_cmdspec_sz);
|
||||
_(IPMICTL_UNREGISTER_FOR_CMD, READ, struct_ipmi_cmdspec_sz);
|
||||
_(IPMICTL_SET_GETS_EVENTS_CMD, READ, sizeof(int));
|
||||
_(IPMICTL_SET_MY_ADDRESS_CMD, READ, sizeof(unsigned int));
|
||||
_(IPMICTL_GET_MY_ADDRESS_CMD, WRITE, sizeof(unsigned int));
|
||||
_(IPMICTL_SET_MY_LUN_CMD, READ, sizeof(unsigned int));
|
||||
_(IPMICTL_GET_MY_LUN_CMD, WRITE, sizeof(unsigned int));
|
||||
/* Entries from file: soundcard.h */
|
||||
_(SNDCTL_DSP_RESET, NONE, 0);
|
||||
_(SNDCTL_DSP_SYNC, NONE, 0);
|
||||
|
@ -779,7 +779,11 @@ int internal_sysctl(const int *name, unsigned int namelen, void *oldp,
|
||||
#if SANITIZER_FREEBSD
|
||||
int internal_sysctlbyname(const char *sname, void *oldp, uptr *oldlenp,
|
||||
const void *newp, uptr newlen) {
|
||||
return sysctlbyname(sname, oldp, (size_t *)oldlenp, newp, (size_t)newlen);
|
||||
static decltype(sysctlbyname) *real = nullptr;
|
||||
if (!real)
|
||||
real = (decltype(sysctlbyname) *)dlsym(RTLD_NEXT, "sysctlbyname");
|
||||
CHECK(real);
|
||||
return real(sname, oldp, (size_t *)oldlenp, newp, (size_t)newlen);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -62,6 +62,8 @@
|
||||
#include <sys/event.h>
|
||||
#include <sys/filio.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/ipmi.h>
|
||||
#include <sys/kcov.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/mount.h>
|
||||
@ -123,9 +125,6 @@
|
||||
#include <dev/isa/isvio.h>
|
||||
#include <dev/isa/wtreg.h>
|
||||
#include <dev/iscsi/iscsi_ioctl.h>
|
||||
#if 0
|
||||
#include <dev/nvmm/nvmm_ioctl.h>
|
||||
#endif
|
||||
#include <dev/ofw/openfirmio.h>
|
||||
#include <dev/pci/amrio.h>
|
||||
#include <dev/pci/mlyreg.h>
|
||||
@ -168,6 +167,7 @@
|
||||
#include <dev/raidframe/raidframeio.h>
|
||||
#include <dev/sbus/mbppio.h>
|
||||
#include <dev/scsipi/ses.h>
|
||||
#include <dev/spi/spi_io.h>
|
||||
#include <dev/spkrio.h>
|
||||
#include <dev/sun/disklabel.h>
|
||||
#include <dev/sun/fbio.h>
|
||||
@ -221,6 +221,10 @@
|
||||
#include <regex.h>
|
||||
#include <fstab.h>
|
||||
#include <stringlist.h>
|
||||
|
||||
#if defined(__x86_64__)
|
||||
#include <nvmm.h>
|
||||
#endif
|
||||
// clang-format on
|
||||
|
||||
// Include these after system headers to avoid name clashes and ambiguities.
|
||||
@ -686,6 +690,26 @@ unsigned struct_usb_config_desc_sz = sizeof(usb_config_desc);
|
||||
unsigned struct_usb_ctl_report_desc_sz = sizeof(usb_ctl_report_desc);
|
||||
unsigned struct_usb_ctl_report_sz = sizeof(usb_ctl_report);
|
||||
unsigned struct_usb_ctl_request_sz = sizeof(usb_ctl_request);
|
||||
#if defined(__x86_64__)
|
||||
unsigned struct_nvmm_ioc_capability_sz = sizeof(nvmm_ioc_capability);
|
||||
unsigned struct_nvmm_ioc_machine_create_sz = sizeof(nvmm_ioc_machine_create);
|
||||
unsigned struct_nvmm_ioc_machine_destroy_sz = sizeof(nvmm_ioc_machine_destroy);
|
||||
unsigned struct_nvmm_ioc_machine_configure_sz =
|
||||
sizeof(nvmm_ioc_machine_configure);
|
||||
unsigned struct_nvmm_ioc_vcpu_create_sz = sizeof(nvmm_ioc_vcpu_create);
|
||||
unsigned struct_nvmm_ioc_vcpu_destroy_sz = sizeof(nvmm_ioc_vcpu_destroy);
|
||||
unsigned struct_nvmm_ioc_vcpu_setstate_sz = sizeof(nvmm_ioc_vcpu_destroy);
|
||||
unsigned struct_nvmm_ioc_vcpu_getstate_sz = sizeof(nvmm_ioc_vcpu_getstate);
|
||||
unsigned struct_nvmm_ioc_vcpu_inject_sz = sizeof(nvmm_ioc_vcpu_inject);
|
||||
unsigned struct_nvmm_ioc_vcpu_run_sz = sizeof(nvmm_ioc_vcpu_run);
|
||||
unsigned struct_nvmm_ioc_gpa_map_sz = sizeof(nvmm_ioc_gpa_map);
|
||||
unsigned struct_nvmm_ioc_gpa_unmap_sz = sizeof(nvmm_ioc_gpa_unmap);
|
||||
unsigned struct_nvmm_ioc_hva_map_sz = sizeof(nvmm_ioc_hva_map);
|
||||
unsigned struct_nvmm_ioc_hva_unmap_sz = sizeof(nvmm_ioc_hva_unmap);
|
||||
unsigned struct_nvmm_ioc_ctl_sz = sizeof(nvmm_ioc_ctl);
|
||||
#endif
|
||||
unsigned struct_spi_ioctl_configure_sz = sizeof(spi_ioctl_configure);
|
||||
unsigned struct_spi_ioctl_transfer_sz = sizeof(spi_ioctl_transfer);
|
||||
unsigned struct_autofs_daemon_request_sz = sizeof(autofs_daemon_request);
|
||||
unsigned struct_autofs_daemon_done_sz = sizeof(autofs_daemon_done);
|
||||
unsigned struct_sctp_connectx_addrs_sz = sizeof(sctp_connectx_addrs);
|
||||
@ -728,6 +752,9 @@ unsigned struct_vnd_user_sz = sizeof(vnd_user);
|
||||
unsigned struct_vt_stat_sz = sizeof(vt_stat);
|
||||
unsigned struct_wdog_conf_sz = sizeof(wdog_conf);
|
||||
unsigned struct_wdog_mode_sz = sizeof(wdog_mode);
|
||||
unsigned struct_ipmi_recv_sz = sizeof(ipmi_recv);
|
||||
unsigned struct_ipmi_req_sz = sizeof(ipmi_req);
|
||||
unsigned struct_ipmi_cmdspec_sz = sizeof(ipmi_cmdspec);
|
||||
unsigned struct_wfq_conf_sz = sizeof(wfq_conf);
|
||||
unsigned struct_wfq_getqid_sz = sizeof(wfq_getqid);
|
||||
unsigned struct_wfq_getstats_sz = sizeof(wfq_getstats);
|
||||
@ -813,6 +840,7 @@ unsigned struct_iscsi_wait_event_parameters_sz =
|
||||
unsigned struct_isp_stats_sz = sizeof(isp_stats_t);
|
||||
unsigned struct_lsenable_sz = sizeof(struct lsenable);
|
||||
unsigned struct_lsdisable_sz = sizeof(struct lsdisable);
|
||||
unsigned struct_audio_format_query_sz = sizeof(audio_format_query);
|
||||
unsigned struct_mixer_ctrl_sz = sizeof(struct mixer_ctrl);
|
||||
unsigned struct_mixer_devinfo_sz = sizeof(struct mixer_devinfo);
|
||||
unsigned struct_mpu_command_rec_sz = sizeof(mpu_command_rec);
|
||||
@ -1423,7 +1451,7 @@ unsigned IOCTL_SPKRTONE = SPKRTONE;
|
||||
unsigned IOCTL_SPKRTUNE = SPKRTUNE;
|
||||
unsigned IOCTL_SPKRGETVOL = SPKRGETVOL;
|
||||
unsigned IOCTL_SPKRSETVOL = SPKRSETVOL;
|
||||
#if 0 /* interfaces are WIP */
|
||||
#if defined(__x86_64__)
|
||||
unsigned IOCTL_NVMM_IOC_CAPABILITY = NVMM_IOC_CAPABILITY;
|
||||
unsigned IOCTL_NVMM_IOC_MACHINE_CREATE = NVMM_IOC_MACHINE_CREATE;
|
||||
unsigned IOCTL_NVMM_IOC_MACHINE_DESTROY = NVMM_IOC_MACHINE_DESTROY;
|
||||
@ -1438,7 +1466,10 @@ unsigned IOCTL_NVMM_IOC_GPA_MAP = NVMM_IOC_GPA_MAP;
|
||||
unsigned IOCTL_NVMM_IOC_GPA_UNMAP = NVMM_IOC_GPA_UNMAP;
|
||||
unsigned IOCTL_NVMM_IOC_HVA_MAP = NVMM_IOC_HVA_MAP;
|
||||
unsigned IOCTL_NVMM_IOC_HVA_UNMAP = NVMM_IOC_HVA_UNMAP;
|
||||
unsigned IOCTL_NVMM_IOC_CTL = NVMM_IOC_CTL;
|
||||
#endif
|
||||
unsigned IOCTL_SPI_IOCTL_CONFIGURE = SPI_IOCTL_CONFIGURE;
|
||||
unsigned IOCTL_SPI_IOCTL_TRANSFER = SPI_IOCTL_TRANSFER;
|
||||
unsigned IOCTL_AUTOFSREQUEST = AUTOFSREQUEST;
|
||||
unsigned IOCTL_AUTOFSDONE = AUTOFSDONE;
|
||||
unsigned IOCTL_BIOCGBLEN = BIOCGBLEN;
|
||||
@ -1656,6 +1687,9 @@ unsigned IOCTL_AUDIO_GETPROPS = AUDIO_GETPROPS;
|
||||
unsigned IOCTL_AUDIO_GETBUFINFO = AUDIO_GETBUFINFO;
|
||||
unsigned IOCTL_AUDIO_SETCHAN = AUDIO_SETCHAN;
|
||||
unsigned IOCTL_AUDIO_GETCHAN = AUDIO_GETCHAN;
|
||||
unsigned IOCTL_AUDIO_QUERYFORMAT = AUDIO_QUERYFORMAT;
|
||||
unsigned IOCTL_AUDIO_GETFORMAT = AUDIO_GETFORMAT;
|
||||
unsigned IOCTL_AUDIO_SETFORMAT = AUDIO_SETFORMAT;
|
||||
unsigned IOCTL_AUDIO_MIXER_READ = AUDIO_MIXER_READ;
|
||||
unsigned IOCTL_AUDIO_MIXER_WRITE = AUDIO_MIXER_WRITE;
|
||||
unsigned IOCTL_AUDIO_MIXER_DEVINFO = AUDIO_MIXER_DEVINFO;
|
||||
@ -1741,6 +1775,7 @@ unsigned IOCTL_DIOCTUR = DIOCTUR;
|
||||
unsigned IOCTL_DIOCMWEDGES = DIOCMWEDGES;
|
||||
unsigned IOCTL_DIOCGSECTORSIZE = DIOCGSECTORSIZE;
|
||||
unsigned IOCTL_DIOCGMEDIASIZE = DIOCGMEDIASIZE;
|
||||
unsigned IOCTL_DIOCRMWEDGES = DIOCRMWEDGES;
|
||||
unsigned IOCTL_DRVDETACHDEV = DRVDETACHDEV;
|
||||
unsigned IOCTL_DRVRESCANBUS = DRVRESCANBUS;
|
||||
unsigned IOCTL_DRVCTLCOMMAND = DRVCTLCOMMAND;
|
||||
@ -1945,6 +1980,8 @@ unsigned IOCTL_SIOCSLINKSTR = SIOCSLINKSTR;
|
||||
unsigned IOCTL_SIOCGETHERCAP = SIOCGETHERCAP;
|
||||
unsigned IOCTL_SIOCGIFINDEX = SIOCGIFINDEX;
|
||||
unsigned IOCTL_SIOCSETHERCAP = SIOCSETHERCAP;
|
||||
unsigned IOCTL_SIOCSIFDESCR = SIOCSIFDESCR;
|
||||
unsigned IOCTL_SIOCGIFDESCR = SIOCGIFDESCR;
|
||||
unsigned IOCTL_SIOCGUMBINFO = SIOCGUMBINFO;
|
||||
unsigned IOCTL_SIOCSUMBPARAM = SIOCSUMBPARAM;
|
||||
unsigned IOCTL_SIOCGUMBPARAM = SIOCGUMBPARAM;
|
||||
@ -2069,6 +2106,19 @@ unsigned IOCTL_WDOGIOC_WHICH = WDOGIOC_WHICH;
|
||||
unsigned IOCTL_WDOGIOC_TICKLE = WDOGIOC_TICKLE;
|
||||
unsigned IOCTL_WDOGIOC_GTICKLER = WDOGIOC_GTICKLER;
|
||||
unsigned IOCTL_WDOGIOC_GWDOGS = WDOGIOC_GWDOGS;
|
||||
unsigned IOCTL_KCOV_IOC_SETBUFSIZE = KCOV_IOC_SETBUFSIZE;
|
||||
unsigned IOCTL_KCOV_IOC_ENABLE = KCOV_IOC_ENABLE;
|
||||
unsigned IOCTL_KCOV_IOC_DISABLE = KCOV_IOC_DISABLE;
|
||||
unsigned IOCTL_IPMICTL_RECEIVE_MSG_TRUNC = IPMICTL_RECEIVE_MSG_TRUNC;
|
||||
unsigned IOCTL_IPMICTL_RECEIVE_MSG = IPMICTL_RECEIVE_MSG;
|
||||
unsigned IOCTL_IPMICTL_SEND_COMMAND = IPMICTL_SEND_COMMAND;
|
||||
unsigned IOCTL_IPMICTL_REGISTER_FOR_CMD = IPMICTL_REGISTER_FOR_CMD;
|
||||
unsigned IOCTL_IPMICTL_UNREGISTER_FOR_CMD = IPMICTL_UNREGISTER_FOR_CMD;
|
||||
unsigned IOCTL_IPMICTL_SET_GETS_EVENTS_CMD = IPMICTL_SET_GETS_EVENTS_CMD;
|
||||
unsigned IOCTL_IPMICTL_SET_MY_ADDRESS_CMD = IPMICTL_SET_MY_ADDRESS_CMD;
|
||||
unsigned IOCTL_IPMICTL_GET_MY_ADDRESS_CMD = IPMICTL_GET_MY_ADDRESS_CMD;
|
||||
unsigned IOCTL_IPMICTL_SET_MY_LUN_CMD = IPMICTL_SET_MY_LUN_CMD;
|
||||
unsigned IOCTL_IPMICTL_GET_MY_LUN_CMD = IPMICTL_GET_MY_LUN_CMD;
|
||||
unsigned IOCTL_SNDCTL_DSP_RESET = SNDCTL_DSP_RESET;
|
||||
unsigned IOCTL_SNDCTL_DSP_SYNC = SNDCTL_DSP_SYNC;
|
||||
unsigned IOCTL_SNDCTL_DSP_SPEED = SNDCTL_DSP_SPEED;
|
||||
|
@ -849,6 +849,25 @@ extern unsigned struct_usb_config_desc_sz;
|
||||
extern unsigned struct_usb_ctl_report_desc_sz;
|
||||
extern unsigned struct_usb_ctl_report_sz;
|
||||
extern unsigned struct_usb_ctl_request_sz;
|
||||
#if defined(__x86_64__)
|
||||
extern unsigned struct_nvmm_ioc_capability_sz;
|
||||
extern unsigned struct_nvmm_ioc_machine_create_sz;
|
||||
extern unsigned struct_nvmm_ioc_machine_destroy_sz;
|
||||
extern unsigned struct_nvmm_ioc_machine_configure_sz;
|
||||
extern unsigned struct_nvmm_ioc_vcpu_create_sz;
|
||||
extern unsigned struct_nvmm_ioc_vcpu_destroy_sz;
|
||||
extern unsigned struct_nvmm_ioc_vcpu_setstate_sz;
|
||||
extern unsigned struct_nvmm_ioc_vcpu_getstate_sz;
|
||||
extern unsigned struct_nvmm_ioc_vcpu_inject_sz;
|
||||
extern unsigned struct_nvmm_ioc_vcpu_run_sz;
|
||||
extern unsigned struct_nvmm_ioc_gpa_map_sz;
|
||||
extern unsigned struct_nvmm_ioc_gpa_unmap_sz;
|
||||
extern unsigned struct_nvmm_ioc_hva_map_sz;
|
||||
extern unsigned struct_nvmm_ioc_hva_unmap_sz;
|
||||
extern unsigned struct_nvmm_ioc_ctl_sz;
|
||||
#endif
|
||||
extern unsigned struct_spi_ioctl_configure_sz;
|
||||
extern unsigned struct_spi_ioctl_transfer_sz;
|
||||
extern unsigned struct_autofs_daemon_request_sz;
|
||||
extern unsigned struct_autofs_daemon_done_sz;
|
||||
extern unsigned struct_sctp_connectx_addrs_sz;
|
||||
@ -891,6 +910,9 @@ extern unsigned struct_vnd_user_sz;
|
||||
extern unsigned struct_vt_stat_sz;
|
||||
extern unsigned struct_wdog_conf_sz;
|
||||
extern unsigned struct_wdog_mode_sz;
|
||||
extern unsigned struct_ipmi_recv_sz;
|
||||
extern unsigned struct_ipmi_req_sz;
|
||||
extern unsigned struct_ipmi_cmdspec_sz;
|
||||
extern unsigned struct_wfq_conf_sz;
|
||||
extern unsigned struct_wfq_getqid_sz;
|
||||
extern unsigned struct_wfq_getstats_sz;
|
||||
@ -969,6 +991,7 @@ extern unsigned struct_iscsi_wait_event_parameters_sz;
|
||||
extern unsigned struct_isp_stats_sz;
|
||||
extern unsigned struct_lsenable_sz;
|
||||
extern unsigned struct_lsdisable_sz;
|
||||
extern unsigned struct_audio_format_query_sz;
|
||||
extern unsigned struct_mixer_ctrl_sz;
|
||||
extern unsigned struct_mixer_devinfo_sz;
|
||||
extern unsigned struct_mpu_command_rec_sz;
|
||||
@ -1575,7 +1598,7 @@ extern unsigned IOCTL_SPKRTONE;
|
||||
extern unsigned IOCTL_SPKRTUNE;
|
||||
extern unsigned IOCTL_SPKRGETVOL;
|
||||
extern unsigned IOCTL_SPKRSETVOL;
|
||||
#if 0 /* interfaces are WIP */
|
||||
#if defined(__x86_64__)
|
||||
extern unsigned IOCTL_NVMM_IOC_CAPABILITY;
|
||||
extern unsigned IOCTL_NVMM_IOC_MACHINE_CREATE;
|
||||
extern unsigned IOCTL_NVMM_IOC_MACHINE_DESTROY;
|
||||
@ -1590,6 +1613,7 @@ extern unsigned IOCTL_NVMM_IOC_GPA_MAP;
|
||||
extern unsigned IOCTL_NVMM_IOC_GPA_UNMAP;
|
||||
extern unsigned IOCTL_NVMM_IOC_HVA_MAP;
|
||||
extern unsigned IOCTL_NVMM_IOC_HVA_UNMAP;
|
||||
extern unsigned IOCTL_NVMM_IOC_CTL;
|
||||
#endif
|
||||
extern unsigned IOCTL_AUTOFSREQUEST;
|
||||
extern unsigned IOCTL_AUTOFSDONE;
|
||||
@ -1808,6 +1832,9 @@ extern unsigned IOCTL_AUDIO_GETPROPS;
|
||||
extern unsigned IOCTL_AUDIO_GETBUFINFO;
|
||||
extern unsigned IOCTL_AUDIO_SETCHAN;
|
||||
extern unsigned IOCTL_AUDIO_GETCHAN;
|
||||
extern unsigned IOCTL_AUDIO_QUERYFORMAT;
|
||||
extern unsigned IOCTL_AUDIO_GETFORMAT;
|
||||
extern unsigned IOCTL_AUDIO_SETFORMAT;
|
||||
extern unsigned IOCTL_AUDIO_MIXER_READ;
|
||||
extern unsigned IOCTL_AUDIO_MIXER_WRITE;
|
||||
extern unsigned IOCTL_AUDIO_MIXER_DEVINFO;
|
||||
@ -1893,6 +1920,7 @@ extern unsigned IOCTL_DIOCTUR;
|
||||
extern unsigned IOCTL_DIOCMWEDGES;
|
||||
extern unsigned IOCTL_DIOCGSECTORSIZE;
|
||||
extern unsigned IOCTL_DIOCGMEDIASIZE;
|
||||
extern unsigned IOCTL_DIOCRMWEDGES;
|
||||
extern unsigned IOCTL_DRVDETACHDEV;
|
||||
extern unsigned IOCTL_DRVRESCANBUS;
|
||||
extern unsigned IOCTL_DRVCTLCOMMAND;
|
||||
@ -1994,6 +2022,8 @@ extern unsigned IOCTL_SEQUENCER_TMR_TEMPO;
|
||||
extern unsigned IOCTL_SEQUENCER_TMR_SOURCE;
|
||||
extern unsigned IOCTL_SEQUENCER_TMR_METRONOME;
|
||||
extern unsigned IOCTL_SEQUENCER_TMR_SELECT;
|
||||
extern unsigned IOCTL_SPI_IOCTL_CONFIGURE;
|
||||
extern unsigned IOCTL_SPI_IOCTL_TRANSFER;
|
||||
extern unsigned IOCTL_MTIOCTOP;
|
||||
extern unsigned IOCTL_MTIOCGET;
|
||||
extern unsigned IOCTL_MTIOCIEOT;
|
||||
@ -2097,6 +2127,8 @@ extern unsigned IOCTL_SIOCSLINKSTR;
|
||||
extern unsigned IOCTL_SIOCGETHERCAP;
|
||||
extern unsigned IOCTL_SIOCGIFINDEX;
|
||||
extern unsigned IOCTL_SIOCSETHERCAP;
|
||||
extern unsigned IOCTL_SIOCSIFDESCR;
|
||||
extern unsigned IOCTL_SIOCGIFDESCR;
|
||||
extern unsigned IOCTL_SIOCGUMBINFO;
|
||||
extern unsigned IOCTL_SIOCSUMBPARAM;
|
||||
extern unsigned IOCTL_SIOCGUMBPARAM;
|
||||
@ -2221,6 +2253,19 @@ extern unsigned IOCTL_WDOGIOC_WHICH;
|
||||
extern unsigned IOCTL_WDOGIOC_TICKLE;
|
||||
extern unsigned IOCTL_WDOGIOC_GTICKLER;
|
||||
extern unsigned IOCTL_WDOGIOC_GWDOGS;
|
||||
extern unsigned IOCTL_KCOV_IOC_SETBUFSIZE;
|
||||
extern unsigned IOCTL_KCOV_IOC_ENABLE;
|
||||
extern unsigned IOCTL_KCOV_IOC_DISABLE;
|
||||
extern unsigned IOCTL_IPMICTL_RECEIVE_MSG_TRUNC;
|
||||
extern unsigned IOCTL_IPMICTL_RECEIVE_MSG;
|
||||
extern unsigned IOCTL_IPMICTL_SEND_COMMAND;
|
||||
extern unsigned IOCTL_IPMICTL_REGISTER_FOR_CMD;
|
||||
extern unsigned IOCTL_IPMICTL_UNREGISTER_FOR_CMD;
|
||||
extern unsigned IOCTL_IPMICTL_SET_GETS_EVENTS_CMD;
|
||||
extern unsigned IOCTL_IPMICTL_SET_MY_ADDRESS_CMD;
|
||||
extern unsigned IOCTL_IPMICTL_GET_MY_ADDRESS_CMD;
|
||||
extern unsigned IOCTL_IPMICTL_SET_MY_LUN_CMD;
|
||||
extern unsigned IOCTL_IPMICTL_GET_MY_LUN_CMD;
|
||||
extern unsigned IOCTL_SNDCTL_DSP_RESET;
|
||||
extern unsigned IOCTL_SNDCTL_DSP_SYNC;
|
||||
extern unsigned IOCTL_SNDCTL_DSP_SPEED;
|
||||
|
@ -149,6 +149,7 @@ static void BackgroundThread(void *arg) {
|
||||
// We don't use ScopedIgnoreInterceptors, because we want ignores to be
|
||||
// enabled even when the thread function exits (e.g. during pthread thread
|
||||
// shutdown code).
|
||||
cur_thread_init();
|
||||
cur_thread()->ignore_interceptors++;
|
||||
const u64 kMs2Ns = 1000 * 1000;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user