source: trunk/src/kmk/w32/include/sub_proc.h

Last change on this file was 3156, checked in by bird, 8 years ago

kmk/win: Reworking child process handling. This effort will hopefully handle processor groups better and allow executing internal function off the main thread.

  • Property svn:eol-style set to native
File size: 2.6 KB
Line 
1/* Definitions for Windows process invocation.
2Copyright (C) 1996-2016 Free Software Foundation, Inc.
3This file is part of GNU Make.
4
5GNU Make is free software; you can redistribute it and/or modify it under the
6terms of the GNU General Public License as published by the Free Software
7Foundation; either version 3 of the License, or (at your option) any later
8version.
9
10GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
11WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License along with
15this program. If not, see <http://www.gnu.org/licenses/>. */
16
17#ifndef SUB_PROC_H
18#define SUB_PROC_H
19#ifdef CONFIG_NEW_WIN_CHILDREN
20# error "Just checking..."
21#endif
22
23/*
24 * Component Name:
25 *
26 * $Date$
27 *
28 * $Source$
29 *
30 * $Id$
31 */
32
33#define EXTERN_DECL(entry, args) extern entry args
34#define VOID_DECL void
35
36EXTERN_DECL(HANDLE process_init, (VOID_DECL));
37EXTERN_DECL(HANDLE process_init_fd, (HANDLE stdinh, HANDLE stdouth,
38 HANDLE stderrh));
39EXTERN_DECL(long process_begin, (HANDLE proc, char **argv, char **envp,
40 char *exec_path, char *as_user));
41EXTERN_DECL(long process_pipe_io, (HANDLE proc, char *stdin_data,
42 int stdin_data_len));
43#ifndef KMK /* unused */
44EXTERN_DECL(long process_file_io, (HANDLE proc));
45#endif
46EXTERN_DECL(void process_cleanup, (HANDLE proc));
47EXTERN_DECL(HANDLE process_wait_for_any, (int block, DWORD* pdwWaitStatus));
48EXTERN_DECL(void process_register, (HANDLE proc));
49EXTERN_DECL(HANDLE process_easy, (char** argv, char** env,
50 int outfd, int errfd));
51EXTERN_DECL(BOOL process_kill, (HANDLE proc, int signal));
52EXTERN_DECL(int process_used_slots, (VOID_DECL));
53EXTERN_DECL(DWORD process_set_handles, (HANDLE *handles));
54
55#ifdef KMK
56EXTERN_DECL(int process_kmk_register_submit, (HANDLE hEvent, intptr_t clue, pid_t *pPid));
57EXTERN_DECL(int process_kmk_register_redirect, (HANDLE hProcess, pid_t *pPid));
58#endif
59
60/* support routines */
61EXTERN_DECL(long process_errno, (HANDLE proc));
62EXTERN_DECL(long process_last_err, (HANDLE proc));
63EXTERN_DECL(long process_exit_code, (HANDLE proc));
64EXTERN_DECL(long process_signal, (HANDLE proc));
65EXTERN_DECL(char * process_outbuf, (HANDLE proc));
66EXTERN_DECL(char * process_errbuf, (HANDLE proc));
67EXTERN_DECL(int process_outcnt, (HANDLE proc));
68EXTERN_DECL(int process_errcnt, (HANDLE proc));
69EXTERN_DECL(void process_pipes, (HANDLE proc, int pipes[3]));
70EXTERN_DECL(void process_noinherit, (int fildes));
71
72#endif
Note: See TracBrowser for help on using the repository browser.