src/os/solaris/vm/os_solaris.hpp

changeset 579
e3729351c946
parent 495
8d84e28e68ba
child 631
d1605aabd0a1
     1.1 --- a/src/os/solaris/vm/os_solaris.hpp	Tue May 06 15:37:36 2008 -0700
     1.2 +++ b/src/os/solaris/vm/os_solaris.hpp	Fri May 09 16:34:08 2008 +0400
     1.3 @@ -66,6 +66,7 @@
     1.4  
     1.5    typedef uintptr_t       lgrp_cookie_t;
     1.6    typedef id_t            lgrp_id_t;
     1.7 +  typedef int             lgrp_rsrc_t;
     1.8    typedef enum lgrp_view {
     1.9          LGRP_VIEW_CALLER,       /* what's available to the caller */
    1.10          LGRP_VIEW_OS            /* what's available to operating system */
    1.11 @@ -77,6 +78,9 @@
    1.12    typedef lgrp_id_t (*lgrp_root_func_t)(lgrp_cookie_t cookie);
    1.13    typedef int (*lgrp_children_func_t)(lgrp_cookie_t  cookie,  lgrp_id_t  parent,
    1.14                                        lgrp_id_t *lgrp_array, uint_t lgrp_array_size);
    1.15 +  typedef int (*lgrp_resources_func_t)(lgrp_cookie_t  cookie,  lgrp_id_t  lgrp,
    1.16 +                                      lgrp_id_t *lgrp_array, uint_t lgrp_array_size,
    1.17 +                                      lgrp_rsrc_t type);
    1.18    typedef int (*lgrp_nlgrps_func_t)(lgrp_cookie_t cookie);
    1.19    typedef int (*lgrp_cookie_stale_func_t)(lgrp_cookie_t cookie);
    1.20    typedef int (*meminfo_func_t)(const uint64_t inaddr[],   int addr_count,
    1.21 @@ -88,6 +92,7 @@
    1.22    static lgrp_fini_func_t _lgrp_fini;
    1.23    static lgrp_root_func_t _lgrp_root;
    1.24    static lgrp_children_func_t _lgrp_children;
    1.25 +  static lgrp_resources_func_t _lgrp_resources;
    1.26    static lgrp_nlgrps_func_t _lgrp_nlgrps;
    1.27    static lgrp_cookie_stale_func_t _lgrp_cookie_stale;
    1.28    static lgrp_cookie_t _lgrp_cookie;
    1.29 @@ -109,7 +114,6 @@
    1.30    static int (*get_libjsig_version)();
    1.31    static void save_preinstalled_handler(int, struct sigaction&);
    1.32    static void check_signal_handler(int sig);
    1.33 -
    1.34    // For overridable signals
    1.35    static int _SIGinterrupt;                  // user-overridable INTERRUPT_SIGNAL
    1.36    static int _SIGasync;                      // user-overridable ASYNC_SIGNAL
    1.37 @@ -253,8 +257,9 @@
    1.38    static void set_lgrp_init(lgrp_init_func_t func) { _lgrp_init = func; }
    1.39    static void set_lgrp_fini(lgrp_fini_func_t func) { _lgrp_fini = func; }
    1.40    static void set_lgrp_root(lgrp_root_func_t func) { _lgrp_root = func; }
    1.41 -  static void set_lgrp_children(lgrp_children_func_t func) { _lgrp_children = func; }
    1.42 -  static void set_lgrp_nlgrps(lgrp_nlgrps_func_t func)     { _lgrp_nlgrps = func; }
    1.43 +  static void set_lgrp_children(lgrp_children_func_t func)   { _lgrp_children = func; }
    1.44 +  static void set_lgrp_resources(lgrp_resources_func_t func) { _lgrp_resources = func; }
    1.45 +  static void set_lgrp_nlgrps(lgrp_nlgrps_func_t func)       { _lgrp_nlgrps = func; }
    1.46    static void set_lgrp_cookie_stale(lgrp_cookie_stale_func_t func) { _lgrp_cookie_stale = func; }
    1.47    static void set_lgrp_cookie(lgrp_cookie_t cookie)  { _lgrp_cookie = cookie; }
    1.48  
    1.49 @@ -266,6 +271,12 @@
    1.50                      lgrp_id_t *lgrp_array, uint_t lgrp_array_size) {
    1.51      return _lgrp_children != NULL ? _lgrp_children(cookie, parent, lgrp_array, lgrp_array_size) : -1;
    1.52    }
    1.53 +  static int lgrp_resources(lgrp_cookie_t  cookie,  lgrp_id_t  lgrp,
    1.54 +                            lgrp_id_t *lgrp_array, uint_t lgrp_array_size,
    1.55 +                            lgrp_rsrc_t type) {
    1.56 +    return _lgrp_resources != NULL ? _lgrp_resources(cookie, lgrp, lgrp_array, lgrp_array_size, type) : -1;
    1.57 +  }
    1.58 +
    1.59    static int lgrp_nlgrps(lgrp_cookie_t cookie)       { return _lgrp_nlgrps != NULL ? _lgrp_nlgrps(cookie) : -1; }
    1.60    static int lgrp_cookie_stale(lgrp_cookie_t cookie) {
    1.61      return _lgrp_cookie_stale != NULL ? _lgrp_cookie_stale(cookie) : -1;

mercurial