src/os/bsd/vm/jvm_bsd.h

changeset 3156
f08d439fab8c
child 3202
436b4a3231bf
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/os/bsd/vm/jvm_bsd.h	Sun Sep 25 16:03:29 2011 -0700
     1.3 @@ -0,0 +1,120 @@
     1.4 +/*
     1.5 + * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 + *
     1.8 + * This code is free software; you can redistribute it and/or modify it
     1.9 + * under the terms of the GNU General Public License version 2 only, as
    1.10 + * published by the Free Software Foundation.
    1.11 + *
    1.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.15 + * version 2 for more details (a copy is included in the LICENSE file that
    1.16 + * accompanied this code).
    1.17 + *
    1.18 + * You should have received a copy of the GNU General Public License version
    1.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.21 + *
    1.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.23 + * or visit www.oracle.com if you need additional information or have any
    1.24 + * questions.
    1.25 + *
    1.26 + */
    1.27 +
    1.28 +#ifndef OS_BSD_VM_JVM_BSD_H
    1.29 +#define OS_BSD_VM_JVM_BSD_H
    1.30 +
    1.31 +/*
    1.32 +// HotSpot integration note:
    1.33 +//
    1.34 +// This is derived from the JDK classic file:
    1.35 +// "$JDK/src/solaris/javavm/export/jvm_md.h":15 (ver. 1.10 98/04/22)
    1.36 +// All local includes have been commented out.
    1.37 +*/
    1.38 +
    1.39 +
    1.40 +#ifndef JVM_MD_H
    1.41 +#define JVM_MD_H
    1.42 +
    1.43 +/*
    1.44 + * This file is currently collecting system-specific dregs for the
    1.45 + * JNI conversion, which should be sorted out later.
    1.46 + */
    1.47 +
    1.48 +#include <dirent.h>             /* For DIR */
    1.49 +#include <sys/param.h>          /* For MAXPATHLEN */
    1.50 +#include <unistd.h>             /* For F_OK, R_OK, W_OK */
    1.51 +
    1.52 +#define JNI_ONLOAD_SYMBOLS      {"JNI_OnLoad"}
    1.53 +#define JNI_ONUNLOAD_SYMBOLS    {"JNI_OnUnload"}
    1.54 +#define JVM_ONLOAD_SYMBOLS      {"JVM_OnLoad"}
    1.55 +#define AGENT_ONLOAD_SYMBOLS    {"Agent_OnLoad"}
    1.56 +#define AGENT_ONUNLOAD_SYMBOLS  {"Agent_OnUnload"}
    1.57 +#define AGENT_ONATTACH_SYMBOLS  {"Agent_OnAttach"}
    1.58 +
    1.59 +#define JNI_LIB_PREFIX "lib"
    1.60 +#ifdef __APPLE__
    1.61 +#define JNI_LIB_SUFFIX ".dylib"
    1.62 +#else
    1.63 +#define JNI_LIB_SUFFIX ".so"
    1.64 +#endif
    1.65 +
    1.66 +// Hack: MAXPATHLEN is 4095 on some Bsd and 4096 on others. This may
    1.67 +//       cause problems if JVM and the rest of JDK are built on different
    1.68 +//       Bsd releases. Here we define JVM_MAXPATHLEN to be MAXPATHLEN + 1,
    1.69 +//       so buffers declared in VM are always >= 4096.
    1.70 +#define JVM_MAXPATHLEN MAXPATHLEN + 1
    1.71 +
    1.72 +#define JVM_R_OK    R_OK
    1.73 +#define JVM_W_OK    W_OK
    1.74 +#define JVM_X_OK    X_OK
    1.75 +#define JVM_F_OK    F_OK
    1.76 +
    1.77 +/*
    1.78 + * File I/O
    1.79 + */
    1.80 +
    1.81 +#include <sys/types.h>
    1.82 +#include <sys/stat.h>
    1.83 +#include <fcntl.h>
    1.84 +#include <errno.h>
    1.85 +
    1.86 +/* O Flags */
    1.87 +
    1.88 +#define JVM_O_RDONLY     O_RDONLY
    1.89 +#define JVM_O_WRONLY     O_WRONLY
    1.90 +#define JVM_O_RDWR       O_RDWR
    1.91 +#define JVM_O_O_APPEND   O_APPEND
    1.92 +#define JVM_O_EXCL       O_EXCL
    1.93 +#define JVM_O_CREAT      O_CREAT
    1.94 +
    1.95 +/* Signal definitions */
    1.96 +
    1.97 +#define BREAK_SIGNAL     SIGQUIT           /* Thread dumping support.    */
    1.98 +#define INTERRUPT_SIGNAL SIGUSR1           /* Interruptible I/O support. */
    1.99 +#define SHUTDOWN1_SIGNAL SIGHUP            /* Shutdown Hooks support.    */
   1.100 +#define SHUTDOWN2_SIGNAL SIGINT
   1.101 +#define SHUTDOWN3_SIGNAL SIGTERM
   1.102 +
   1.103 +#ifndef SIGRTMIN
   1.104 +#ifdef __OpenBSD__
   1.105 +#define SIGRTMIN        1
   1.106 +#else
   1.107 +#define SIGRTMIN        33
   1.108 +#endif
   1.109 +#endif
   1.110 +#ifndef SIGRTMAX
   1.111 +#ifdef __OpenBSD__
   1.112 +#define SIGRTMAX        31
   1.113 +#else
   1.114 +#define SIGRTMAX        63
   1.115 +#endif
   1.116 +#endif
   1.117 +#endif /* JVM_MD_H */
   1.118 +
   1.119 +// Reconciliation History
   1.120 +// jvm_solaris.h        1.6 99/06/22 16:38:47
   1.121 +// End
   1.122 +
   1.123 +#endif // OS_BSD_VM_JVM_BSD_H

mercurial