Print this page
6154 const-ify segment ops structures
*** 472,482 ****
* the insertion point is immediately before seg.
*/
if (base + seg->s_size > addr) {
if (addr >= base || eaddr > base) {
#ifdef __sparc
! extern struct seg_ops segnf_ops;
/*
* no-fault segs must disappear if overlaid.
* XXX need new segment type so
* we don't have to check s_ops
--- 472,482 ----
* the insertion point is immediately before seg.
*/
if (base + seg->s_size > addr) {
if (addr >= base || eaddr > base) {
#ifdef __sparc
! extern const struct seg_ops segnf_ops;
/*
* no-fault segs must disappear if overlaid.
* XXX need new segment type so
* we don't have to check s_ops
*** 880,892 ****
struct seg *segsav;
int as_lock_held;
klwp_t *lwp = ttolwp(curthread);
int is_xhat = 0;
int holding_wpage = 0;
- extern struct seg_ops segdev_ops;
-
-
if (as->a_hat != hat) {
/* This must be an XHAT then */
is_xhat = 1;
--- 880,889 ----
*** 2086,2096 ****
* We're lazy and only return one segment at a time.
*/
int
as_memory(struct as *as, caddr_t *basep, size_t *lenp)
{
! extern struct seg_ops segspt_shmops; /* needs a header file */
struct seg *seg;
caddr_t addr, eaddr;
caddr_t segend;
AS_LOCK_ENTER(as, &as->a_lock, RW_READER);
--- 2083,2093 ----
* We're lazy and only return one segment at a time.
*/
int
as_memory(struct as *as, caddr_t *basep, size_t *lenp)
{
! extern const struct seg_ops segspt_shmops; /* needs a header file */
struct seg *seg;
caddr_t addr, eaddr;
caddr_t segend;
AS_LOCK_ENTER(as, &as->a_lock, RW_READER);
*** 2190,2200 ****
* Call the swapout routines of all segments in the address
* space to do the actual work, accumulating the amount of
* space reclaimed.
*/
for (seg = AS_SEGFIRST(as); seg != NULL; seg = AS_SEGNEXT(as, seg)) {
! struct seg_ops *ov = seg->s_ops;
/*
* We have to check to see if the seg has
* an ops vector because the seg may have
* been in the middle of being set up when
--- 2187,2197 ----
* Call the swapout routines of all segments in the address
* space to do the actual work, accumulating the amount of
* space reclaimed.
*/
for (seg = AS_SEGFIRST(as); seg != NULL; seg = AS_SEGNEXT(as, seg)) {
! const struct seg_ops *ov = seg->s_ops;
/*
* We have to check to see if the seg has
* an ops vector because the seg may have
* been in the middle of being set up when
*** 2630,2640 ****
page_t **pl;
int error;
caddr_t eaddr;
faultcode_t fault_err = 0;
pgcnt_t pl_off;
! extern struct seg_ops segspt_shmops;
ASSERT(AS_LOCK_HELD(as, &as->a_lock));
ASSERT(seg != NULL);
ASSERT(addr >= seg->s_base && addr < seg->s_base + seg->s_size);
ASSERT(addr + size > seg->s_base + seg->s_size);
--- 2627,2637 ----
page_t **pl;
int error;
caddr_t eaddr;
faultcode_t fault_err = 0;
pgcnt_t pl_off;
! extern const struct seg_ops segspt_shmops;
ASSERT(AS_LOCK_HELD(as, &as->a_lock));
ASSERT(seg != NULL);
ASSERT(addr >= seg->s_base && addr < seg->s_base + seg->s_size);
ASSERT(addr + size > seg->s_base + seg->s_size);