mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
Remove posix-w32 subsitutes that require access to process handles
Now that Guile uses the posix_spawn gnulib module, several of Guile's custom w32 functions substitutes no longer work. Some functions relied on populating and maintaining an internal PID-to-Handle database, which is no longer possible. kill, getpriority, setpriority, getaffinity and setaffinity are removed. waitpid is simplified and does not handle ENOHANG. * NEWS: updated * libguile/posix-w32.c (struct proc_record, find_proc, proc_handle): removed (record_proc, delete_proc, prepare_child_handle, compenv): removed (prepare_envblk, lookup_cmd, prepare_cmdline, start_child): removed (kill, getpriority, setpriority, sched_getaffinity): removed (sched_setaffinity): removed (waitpid): modified to just use _cwait. ENOHANG emlation removed. * libguile/posix-w32.h (CPU_ZERO, CPU_ISSET, CPU_SET, CPU_SETSIZE): removed (cpu_set_t, PRIO_PROCESS, PRIO_PGRP, PRIO_USER): removed (HAVE_START_CHILD, HAVE_KILL, HAVE_GETPRIORITY): removed (HAVE_SETPRIORITY, HAVE_SCHED_GETAFFINITY, HAVE_SCHED_SETAFFINITY): removed declarations for waitpid, start_child, kill, getpriority: removed declarations for setpriority, sched_getaffinity, sched_set_affinity: Removed
This commit is contained in:
parent
2e51d3fa26
commit
adbf2156ab
3 changed files with 29 additions and 1009 deletions
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
|||
#ifndef SCM_POSIX_W32_H
|
||||
#define SCM_POSIX_W32_H
|
||||
|
||||
/* Copyright 2001,2006,2018,2020
|
||||
/* Copyright 2001,2006,2018,2020,2025
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Guile.
|
||||
|
@ -67,30 +67,9 @@ struct utsname
|
|||
#define WIFSTOPPED(stat_val) ((stat_val) == (stat_val) ? 0 : 0)
|
||||
#define WSTOPSIG(stat_var) (0)
|
||||
|
||||
#define CPU_ZERO(s) memset(s,0,sizeof(*s))
|
||||
#define CPU_ISSET(b,s) ((*s) & (1U << (b))) != 0
|
||||
#define CPU_SET(b,s) (*s) |= (1U << (b))
|
||||
#define CPU_SETSIZE (8*sizeof(DWORD_PTR))
|
||||
typedef DWORD_PTR cpu_set_t;
|
||||
|
||||
#define PRIO_PROCESS 1
|
||||
#define PRIO_PGRP 2
|
||||
#define PRIO_USER 3
|
||||
|
||||
SCM_INTERNAL int uname (struct utsname * uts);
|
||||
SCM_INTERNAL int waitpid (intptr_t, int *, int);
|
||||
SCM_INTERNAL int w32_status_to_termsig (DWORD status);
|
||||
|
||||
SCM_INTERNAL pid_t start_child (const char *exec_file, char **argv,
|
||||
int reading, int c2p[2], int writing, int p2c[2],
|
||||
int infd, int outfd, int errfd);
|
||||
|
||||
SCM_INTERNAL int kill (int pid, int sig);
|
||||
|
||||
SCM_INTERNAL int getpriority (int which, int who);
|
||||
SCM_INTERNAL int setpriority (int which, int who, int nice_val);
|
||||
SCM_INTERNAL int sched_getaffinity (int pid, size_t mask_size, cpu_set_t *mask);
|
||||
SCM_INTERNAL int sched_setaffinity (int pid, size_t mask_size, cpu_set_t *mask);
|
||||
SCM_INTERNAL void *dlopen_w32 (const char *name, int flags);
|
||||
SCM_INTERNAL void *dlsym_w32 (void *handle, const char *name);
|
||||
SCM_INTERNAL int dlclose_w32 (void *handle);
|
||||
|
@ -99,12 +78,6 @@ SCM_INTERNAL int getpagesize_w32 (void);
|
|||
|
||||
#define HAVE_UNAME 1
|
||||
#define HAVE_WAITPID 1
|
||||
#define HAVE_START_CHILD 1
|
||||
#define HAVE_KILL 1
|
||||
#define HAVE_GETPRIORITY 1
|
||||
#define HAVE_SETPRIORITY 1
|
||||
#define HAVE_SCHED_GETAFFINITY 1
|
||||
#define HAVE_SCHED_SETAFFINITY 1
|
||||
|
||||
#define RTLD_NOW 1
|
||||
#define RTLD_LAZY 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue