101
102 /*
103 * pmem_cookie:
104 * Records physical memory pages to be exported to userland.
105 */
106 struct devmap_pmem_cookie {
107 pgcnt_t dp_npages; /* number of allocated mem pages */
108 page_t **dp_pparray; /* pages allocated for this cookie */
109 vnode_t *dp_vnp; /* vnode associated with this cookie */
110 proc_t *dp_proc; /* proc ptr for resource control */
111 };
112
113 #ifdef _KERNEL
114
115 /*
116 * Mappings of /dev/null come from segdev and have no mapping type.
117 */
118
119 #define SEG_IS_DEVNULL_MAPPING(seg) \
120 ((seg)->s_ops == &segdev_ops && \
121 ((SEGOP_GETTYPE(seg, (seg)->s_base) & (MAP_SHARED | MAP_PRIVATE)) == 0))
122
123 extern void segdev_init(void);
124
125 extern int segdev_create(struct seg *, void *);
126
127 extern int segdev_copyto(struct seg *, caddr_t, const void *, void *, size_t);
128 extern int segdev_copyfrom(struct seg *, caddr_t, const void *, void *, size_t);
129 extern struct seg_ops segdev_ops;
130
131 #endif /* _KERNEL */
132
133 #ifdef __cplusplus
134 }
135 #endif
136
137 #endif /* _VM_SEG_DEV_H */
|
101
102 /*
103 * pmem_cookie:
104 * Records physical memory pages to be exported to userland.
105 */
106 struct devmap_pmem_cookie {
107 pgcnt_t dp_npages; /* number of allocated mem pages */
108 page_t **dp_pparray; /* pages allocated for this cookie */
109 vnode_t *dp_vnp; /* vnode associated with this cookie */
110 proc_t *dp_proc; /* proc ptr for resource control */
111 };
112
113 #ifdef _KERNEL
114
115 /*
116 * Mappings of /dev/null come from segdev and have no mapping type.
117 */
118
119 #define SEG_IS_DEVNULL_MAPPING(seg) \
120 ((seg)->s_ops == &segdev_ops && \
121 ((segop_gettype((seg), (seg)->s_base) & \
122 (MAP_SHARED | MAP_PRIVATE)) == 0))
123
124 extern void segdev_init(void);
125
126 extern int segdev_create(struct seg *, void *);
127
128 extern int segdev_copyto(struct seg *, caddr_t, const void *, void *, size_t);
129 extern int segdev_copyfrom(struct seg *, caddr_t, const void *, void *, size_t);
130 extern struct seg_ops segdev_ops;
131
132 #endif /* _KERNEL */
133
134 #ifdef __cplusplus
135 }
136 #endif
137
138 #endif /* _VM_SEG_DEV_H */
|