mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
The main point of this change is to allow "global" capabilities defined on the base object type. The example here is the clone capability on all objects, which governs the ability to clone a handle. Related changes in this commit: - Renamed `kobject` to `object` as far as the syscall interface is concerned. `kobject` is the cname, but j6_cap_kobject_clone feels clunky. - The above change made me realize that the "object <type>" syntax for specifying object references was also clunky, so now it's "ref <type>" - Having to add `.object` on everywhere to access objects in interface.exposes or object.super was cumbersome, so those properties now return object types directly, instead of ObjectRef. - syscall_verify.cpp.cog now generates code to check capabilities on handles if they're specified in the definition, even when not passing an object to the implementation function.
37 lines
632 B
Modula-2
37 lines
632 B
Modula-2
import "objects/process.def"
|
|
|
|
object vma : object {
|
|
uid d6a12b63b3ed3937
|
|
cname vm_area
|
|
|
|
capabilities [
|
|
map
|
|
unmap
|
|
resize
|
|
]
|
|
|
|
method create [constructor] {
|
|
param size size
|
|
param flags uint32
|
|
}
|
|
|
|
method create_map [constructor cap:map] {
|
|
param size size
|
|
param address address
|
|
param flags uint32
|
|
}
|
|
|
|
method map [cap:map] {
|
|
param process ref process
|
|
param address address
|
|
}
|
|
|
|
method unmap [cap:unmap] {
|
|
param process ref process
|
|
}
|
|
|
|
method resize [cap:resize] {
|
|
param size size [inout]
|
|
}
|
|
}
|