Enable jobserver on W32 when using configure.
[make.git] / w32 / include / sub_proc.h
blobf0a9b6843f107e9ed6930ab618f51e709c74caaf
1 /* Definitions for Windows process invocation.
2 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
3 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
4 This file is part of GNU Make.
6 GNU Make is free software; you can redistribute it and/or modify it under the
7 terms of the GNU General Public License as published by the Free Software
8 Foundation; either version 3 of the License, or (at your option) any later
9 version.
11 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License along with
16 this program. If not, see <http://www.gnu.org/licenses/>. */
18 #ifndef SUB_PROC_H
19 #define SUB_PROC_H
22 * Component Name:
24 * $Date: 2011/11/15 21:12:54 $
26 * $Source: /sources/make/make/w32/include/sub_proc.h,v $
28 * $Id: sub_proc.h,v 1.14 2011/11/15 21:12:54 psmith Exp $
31 #define EXTERN_DECL(entry, args) extern entry args
32 #define VOID_DECL void
34 EXTERN_DECL(HANDLE process_init, (VOID_DECL));
35 EXTERN_DECL(HANDLE process_init_fd, (HANDLE stdinh, HANDLE stdouth,
36 HANDLE stderrh));
37 EXTERN_DECL(long process_begin, (HANDLE proc, char **argv, char **envp,
38 char *exec_path, char *as_user));
39 EXTERN_DECL(long process_pipe_io, (HANDLE proc, char *stdin_data,
40 int stdin_data_len));
41 EXTERN_DECL(long process_file_io, (HANDLE proc));
42 EXTERN_DECL(void process_cleanup, (HANDLE proc));
43 EXTERN_DECL(HANDLE process_wait_for_any, (int block, DWORD* pdwWaitStatus));
44 EXTERN_DECL(void process_register, (HANDLE proc));
45 EXTERN_DECL(HANDLE process_easy, (char** argv, char** env));
46 EXTERN_DECL(BOOL process_kill, (HANDLE proc, int signal));
47 EXTERN_DECL(int process_used_slots, (VOID_DECL));
49 /* support routines */
50 EXTERN_DECL(long process_errno, (HANDLE proc));
51 EXTERN_DECL(long process_last_err, (HANDLE proc));
52 EXTERN_DECL(long process_exit_code, (HANDLE proc));
53 EXTERN_DECL(long process_signal, (HANDLE proc));
54 EXTERN_DECL(char * process_outbuf, (HANDLE proc));
55 EXTERN_DECL(char * process_errbuf, (HANDLE proc));
56 EXTERN_DECL(int process_outcnt, (HANDLE proc));
57 EXTERN_DECL(int process_errcnt, (HANDLE proc));
58 EXTERN_DECL(void process_pipes, (HANDLE proc, int pipes[3]));
60 /* jobserver routines */
61 EXTERN_DECL(int open_jobserver_semaphore, (const char* name));
62 EXTERN_DECL(int create_jobserver_semaphore, (int tokens));
63 EXTERN_DECL(void free_jobserver_semaphore, (VOID_DECL));
64 EXTERN_DECL(int acquire_jobserver_semaphore, (VOID_DECL));
65 EXTERN_DECL(int release_jobserver_semaphore, (VOID_DECL));
66 EXTERN_DECL(int has_jobserver_semaphore, (VOID_DECL));
67 EXTERN_DECL(char* get_jobserver_semaphore_name, (VOID_DECL));
68 EXTERN_DECL(int wait_for_semaphore_or_child_process, (VOID_DECL));
70 #endif