Print this page
use NULL capable segop as a shorthand for no-capabilities
Instead of forcing every segment driver to implement a dummy "return 0"
function, handle NULL capable segop function pointer as "no copabilities
supported" shorthand.

*** 110,120 **** static int segspt_shmpagelock(struct seg *, caddr_t, size_t, struct page ***, enum lock_type, enum seg_rw); static int segspt_shmsetpgsz(struct seg *, caddr_t, size_t, uint_t); static int segspt_shmgetmemid(struct seg *, caddr_t, memid_t *); static lgrp_mem_policy_info_t *segspt_shmgetpolicy(struct seg *, caddr_t); - static int segspt_shmcapable(struct seg *, segcapability_t); struct seg_ops segspt_shmops = { .dup = segspt_shmdup, .unmap = segspt_shmunmap, .free = segspt_shmfree, --- 110,119 ----
*** 134,144 **** .dump = segspt_shmdump, .pagelock = segspt_shmpagelock, .setpagesize = segspt_shmsetpgsz, .getmemid = segspt_shmgetmemid, .getpolicy = segspt_shmgetpolicy, - .capable = segspt_shmcapable, }; static void segspt_purge(struct seg *seg); static int segspt_reclaim(void *, caddr_t, size_t, struct page **, enum seg_rw, int); --- 133,142 ----
*** 3045,3056 **** anon_index = seg_page(seg, addr); policy_info = lgrp_shm_policy_get(amp, anon_index, NULL, 0); return (policy_info); } - - /*ARGSUSED*/ - static int - segspt_shmcapable(struct seg *seg, segcapability_t capability) - { - return (0); - } --- 3043,3047 ----