Changeset cf7b3e0 in mainline
- Timestamp:
- 2009-09-16T22:46:58Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 51d4040
- Parents:
- 57688fe2
- Location:
- contrib
- Files:
-
- 3 added
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
contrib/arch/HelenOS.adl
r57688fe2 rcf7b3e0 34 34 35 35 bind vfs:ns to ns:ns; 36 bind vfs: bd to bd:bd;36 bind vfs:rd to bd:rd; 37 37 bind vfs:devmap_client to devmap:devmap_client; 38 38 bind vfs:device to console:console; -
contrib/arch/kernel/kernel.adl
r57688fe2 rcf7b3e0 3 3 *****************************/ 4 4 5 interface kernel_klog {5 interface sys_klog { 6 6 /* Print using kernel facility */ 7 7 unative_t sys_klog(int fd, const void *buf, size_t size); … … 10 10 }; 11 11 12 interface kernel_console {12 interface sys_console { 13 13 /* Enable kernel console */ 14 14 unative_t sys_debug_enable_console(void); … … 21 21 }; 22 22 23 interface kernel_tls {23 interface sys_tls { 24 24 /* Set thread-local storage pointer (on architectures where kernel mode is required) */ 25 25 unative_t sys_tls_set(unative_t addr); … … 28 28 }; 29 29 30 interface kernel_thread {30 interface sys_thread { 31 31 /* Create new thread */ 32 32 unative_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name, size_t name_len, thread_id_t *uspace_thread_id); … … 45 45 }; 46 46 47 interface kernel_task {47 interface sys_task { 48 48 /* Set name fo the current task */ 49 49 unative_t sys_task_set_name(const char *uspace_name, size_t name_len); … … 56 56 }; 57 57 58 interface kernel_program {58 interface sys_program { 59 59 /* Spawn a new instance of clonable loader service */ 60 60 unative_t sys_program_spawn_loader(char *uspace_name, size_t name_len); … … 63 63 }; 64 64 65 interface kernel_futex {65 interface sys_futex { 66 66 /* Sleep in a futex wait queue */ 67 67 unative_t sys_futex_sleep_timeout(uintptr_t uaddr, uint32_t usec, int flags); … … 74 74 }; 75 75 76 interface kernel_smc {76 interface sys_smc { 77 77 /* Enforce self-modifying code cache coherency */ 78 78 unative_t sys_smc_coherence(uintptr_t va, size_t size); … … 81 81 }; 82 82 83 interface kernel_as {83 interface sys_as { 84 84 /* Create new address space area */ 85 85 unative_t sys_as_area_create(uintptr_t address, size_t size, int flags); … … 100 100 }; 101 101 102 interface kernel_ipc {102 interface sys_ipc { 103 103 /* Fast synchronous IPC call */ 104 104 unative_t sys_ipc_call_sync_fast(unative_t phoneid, unative_t method, unative_t arg1, unative_t arg2, unative_t arg3, ipc_data_t *data); … … 147 147 }; 148 148 149 interface kernel_event {149 interface sys_event { 150 150 /* Subscribe to kernel event notifications */ 151 151 unative_t sys_event_subscribe(unative_t evno, unative_t method); … … 154 154 }; 155 155 156 interface kernel_cap {156 interface sys_cap { 157 157 /* Grant capabilities to a task */ 158 158 unative_t sys_cap_grant(sysarg64_t *uspace_taskid_arg, cap_t caps); … … 165 165 }; 166 166 167 interface kernel_ddi {167 interface sys_ddi { 168 168 /* Enable access I/O address space for the current task */ 169 169 unative_t sys_enable_iospace(ddi_ioarg_t *uspace_io_arg); … … 192 192 }; 193 193 194 interface kernel_sysinfo {194 interface sys_sysinfo { 195 195 /* Check for sysinfo key validity */ 196 196 unative_t sys_sysinfo_valid(unative_t ptr, unative_t len); … … 203 203 }; 204 204 205 interface kernel_debug {205 interface sys_debug { 206 206 /* Connect to the kernel debugging answerbox of a given task */ 207 207 unative_t sys_ipc_connect_kbox(sysarg64_t *uspace_taskid_arg); … … 215 215 *****************************************************/ 216 216 217 frame kernel_console {218 provides: 219 kernel_klog kernel_klog;220 kernel_console kernel_console;221 }; 222 223 frame kernel_proc {224 provides: 225 kernel_tls kernel_tls;226 kernel_thread kernel_thread;227 kernel_task kernel_task;228 kernel_program kernel_program;229 }; 230 231 frame kernel_synch {232 provides: 233 kernel_futex kernel_futex;234 kernel_smc kernel_smc;235 }; 236 237 frame kernel_mm {238 provides: 239 kernel_as kernel_as;240 }; 241 242 frame kernel_ipc {243 provides: 244 kernel_ipc kernel_ipc;245 kernel_event kernel_event;246 }; 247 248 frame kernel_security {249 provides: 250 kernel_cap kernel_cap;251 }; 252 253 frame kernel_ddi {254 provides: 255 kernel_ddi kernel_ddi;256 }; 257 258 frame kernel_sysinfo {259 provides: 260 kernel_sysinfo kernel_sysinfo;261 }; 262 263 frame kernel_debug {264 provides: 265 kernel_debug kernel_debug;217 frame sys_console { 218 provides: 219 sys_klog sys_klog; 220 sys_console sys_console; 221 }; 222 223 frame sys_proc { 224 provides: 225 sys_tls sys_tls; 226 sys_thread sys_thread; 227 sys_task sys_task; 228 sys_program sys_program; 229 }; 230 231 frame sys_synch { 232 provides: 233 sys_futex sys_futex; 234 sys_smc sys_smc; 235 }; 236 237 frame sys_mm { 238 provides: 239 sys_as sys_as; 240 }; 241 242 frame sys_ipc { 243 provides: 244 sys_ipc sys_ipc; 245 sys_event sys_event; 246 }; 247 248 frame sys_security { 249 provides: 250 sys_cap sys_cap; 251 }; 252 253 frame sys_ddi { 254 provides: 255 sys_ddi sys_ddi; 256 }; 257 258 frame sys_sysinfo { 259 provides: 260 sys_sysinfo sys_sysinfo; 261 }; 262 263 frame sys_debug { 264 provides: 265 sys_debug sys_debug; 266 266 }; 267 267 … … 272 272 273 273 architecture kernel { 274 inst kernel_console kernel_console;275 inst kernel_proc kernel_proc;276 inst kernel_synch kernel_synch;277 inst kernel_mm kernel_mm;278 inst kernel_ipc kernel_ipc;279 inst kernel_security kernel_security;280 inst kernel_ddi kernel_ddi;281 inst kernel_sysinfo kernel_sysinfo;282 inst kernel_debug kernel_debug;274 inst sys_console sys_console; 275 inst sys_proc sys_proc; 276 inst sys_synch sys_synch; 277 inst sys_mm sys_mm; 278 inst sys_ipc sys_ipc; 279 inst sys_security sys_security; 280 inst sys_ddi sys_ddi; 281 inst sys_sysinfo sys_sysinfo; 282 inst sys_debug sys_debug; 283 283 284 delegate kernel_klog to kernel_console:kernel_klog;285 delegate kernel_console to kernel_console:kernel_console;286 delegate kernel_tls to kernel_proc:kernel_tls;287 delegate kernel_thread to kernel_proc:kernel_thread;288 delegate kernel_task to kernel_proc:kernel_task;289 delegate kernel_program to kernel_proc:kernel_program;290 delegate kernel_futex to kernel_synch:kernel_futex;291 delegate kernel_smc to kernel_synch:kernel_smc;292 delegate kernel_as to kernel_mm:kernel_as;293 delegate kernel_ipc to kernel_ipc:kernel_sys;294 delegate kernel_event to kernel_ipc:kernel_event;295 delegate kernel_cap to kernel_security:kernel_cap;296 delegate kernel_ddi to kernel_ddi:kernel_ddi;297 delegate kernel_sysinfo to kernel_sysinfo:kernel_sysinfo;298 delegate kernel_debug to kernel_debug:kernel_debug;299 }; 284 delegate sys_klog to sys_console:sys_klog; 285 delegate sys_console to sys_console:sys_console; 286 delegate sys_tls to sys_proc:sys_tls; 287 delegate sys_thread to sys_proc:sys_thread; 288 delegate sys_task to sys_proc:sys_task; 289 delegate sys_program to sys_proc:sys_program; 290 delegate sys_futex to sys_synch:sys_futex; 291 delegate sys_smc to sys_synch:sys_smc; 292 delegate sys_as to sys_mm:sys_as; 293 delegate sys_ipc to sys_ipc:sys_ipc; 294 delegate sys_event to sys_ipc:sys_event; 295 delegate sys_cap to sys_security:sys_cap; 296 delegate sys_ddi to sys_ddi:sys_ddi; 297 delegate sys_sysinfo to sys_sysinfo:sys_sysinfo; 298 delegate sys_debug to sys_debug:sys_debug; 299 }; -
contrib/arch/uspace/app/klog/klog.adl
r57688fe2 rcf7b3e0 4 4 [/uspace/lib/libc/requires] 5 5 protocol: 6 [/uspace/lib/libc/protocol] +6 [/uspace/lib/libc/protocol] | 7 7 [klog.bp] 8 8 }; -
contrib/arch/uspace/lib/libc/bind
r57688fe2 rcf7b3e0 1 1 /* Bind %% to kernel interfaces */ 2 bind %%: kernel_klog to kernel:kernel_klog;3 bind %%: kernel_console to kernel:kernel_console;4 bind %%: kernel_tls to kernel:kernel_tls;5 bind %%: kernel_thread to kernel:kernel_thread;6 bind %%: kernel_task to kernel:kernel_task;7 bind %%: kernel_program to kernel:kernel_program;8 bind %%: kernel_futex to kernel:kernel_futex;9 bind %%: kernel_smc to kernel:kernel_smc;10 bind %%: kernel_as to kernel:kernel_as;11 bind %%: kernel_ipc to kernel:kernel_sys;12 bind %%: kernel_event to kernel:kernel_event;13 bind %%: kernel_cap to kernel:kernel_cap;14 bind %%: kernel_ddi to kernel:kernel_ddi;15 bind %%: kernel_sysinfo to kernel:kernel_sysinfo;16 bind %%: kernel_debug to kernel:kernel_debug;2 bind %%:sys_klog to kernel:sys_klog; 3 bind %%:sys_console to kernel:sys_console; 4 bind %%:sys_tls to kernel:sys_tls; 5 bind %%:sys_thread to kernel:sys_thread; 6 bind %%:sys_task to kernel:sys_task; 7 bind %%:sys_program to kernel:sys_program; 8 bind %%:sys_futex to kernel:sys_futex; 9 bind %%:sys_smc to kernel:sys_smc; 10 bind %%:sys_as to kernel:sys_as; 11 bind %%:sys_ipc to kernel:sys_ipc; 12 bind %%:sys_event to kernel:sys_event; 13 bind %%:sys_cap to kernel:sys_cap; 14 bind %%:sys_ddi to kernel:sys_ddi; 15 bind %%:sys_sysinfo to kernel:sys_sysinfo; 16 bind %%:sys_debug to kernel:sys_debug; -
contrib/arch/uspace/lib/libc/protocol
r57688fe2 rcf7b3e0 1 1 /* Protocol according to which libc uses kernel syscalls */ 2 2 ( 3 ! kernel_klog.sys_klog +4 ! kernel_tls.sys_tls_set +5 ! kernel_thread.sys_thread_create +6 ! kernel_thread.sys_thread_get_id +7 ! kernel_thread.sys_thread_exit +8 ! kernel_task.sys_task_set_name +9 ! kernel_task.sys_task_get_id +10 ! kernel_program.sys_program_spawn_loader +11 ! kernel_futex.sys_futex_sleep_timeout +12 ! kernel_futex.sys_futex_wakeup +13 ! kernel_smc.sys_smc_coherence +14 ! kernel_as.sys_as_area_create +15 ! kernel_as.sys_as_area_resize +16 ! kernel_as.sys_as_area_change_flags +17 ! kernel_as.sys_as_area_destroy +18 ! kernel_ipc.sys_ipc_call_sync_fast +19 ! kernel_ipc.sys_ipc_call_sync_slow +20 ! kernel_ipc.sys_ipc_call_async_fast +21 ! kernel_ipc.sys_ipc_call_async_slow +22 ! kernel_ipc.sys_ipc_forward_fast +23 ! kernel_ipc.sys_ipc_forward_slow +24 ! kernel_ipc.sys_ipc_answer_fast +25 ! kernel_ipc.sys_ipc_answer_slow +26 ! kernel_ipc.sys_ipc_hangup +27 ! kernel_ipc.sys_ipc_wait_for_call +28 ! kernel_ipc.sys_ipc_poke +29 ! kernel_event.sys_event_subscribe +30 ! kernel_cap.sys_cap_grant +31 ! kernel_cap.sys_cap_rewoke +32 ! kernel_ddi.sys_enable_iospace +33 ! kernel_ddi.sys_physmem_map +34 ! kernel_ddi.sys_device_assign_devno +35 ! kernel_ddi.sys_preempt_control +36 ! kernel_ddi.sys_ipc_register_irq +37 ! kernel_ddi.sys_ipc_unregister_irq +38 ! kernel_sysinfo.sys_sysinfo_valid +39 ! kernel_sysinfo.sys_sysinfo_value +40 ! kernel_debug.sys_ipc_connect_kbox3 !sys_klog.sys_klog + 4 !sys_tls.sys_tls_set + 5 !sys_thread.sys_thread_create + 6 !sys_thread.sys_thread_get_id + 7 !sys_thread.sys_thread_exit + 8 !sys_task.sys_task_set_name + 9 !sys_task.sys_task_get_id + 10 !sys_program.sys_program_spawn_loader + 11 !sys_futex.sys_futex_sleep_timeout + 12 !sys_futex.sys_futex_wakeup + 13 !sys_smc.sys_smc_coherence + 14 !sys_as.sys_as_area_create + 15 !sys_as.sys_as_area_resize + 16 !sys_as.sys_as_area_change_flags + 17 !sys_as.sys_as_area_destroy + 18 !sys_ipc.sys_ipc_call_sync_fast + 19 !sys_ipc.sys_ipc_call_sync_slow + 20 !sys_ipc.sys_ipc_call_async_fast + 21 !sys_ipc.sys_ipc_call_async_slow + 22 !sys_ipc.sys_ipc_forward_fast + 23 !sys_ipc.sys_ipc_forward_slow + 24 !sys_ipc.sys_ipc_answer_fast + 25 !sys_ipc.sys_ipc_answer_slow + 26 !sys_ipc.sys_ipc_hangup + 27 !sys_ipc.sys_ipc_wait_for_call + 28 !sys_ipc.sys_ipc_poke + 29 !sys_event.sys_event_subscribe + 30 !sys_cap.sys_cap_grant + 31 !sys_cap.sys_cap_rewoke + 32 !sys_ddi.sys_enable_iospace + 33 !sys_ddi.sys_physmem_map + 34 !sys_ddi.sys_device_assign_devno + 35 !sys_ddi.sys_preempt_control + 36 !sys_ddi.sys_ipc_register_irq + 37 !sys_ddi.sys_ipc_unregister_irq + 38 !sys_sysinfo.sys_sysinfo_valid + 39 !sys_sysinfo.sys_sysinfo_value + 40 !sys_debug.sys_ipc_connect_kbox 41 41 )* -
contrib/arch/uspace/lib/libc/requires
r57688fe2 rcf7b3e0 1 1 /* Kernel interfaces required by libc */ 2 kernel_klog kernel_klog;3 kernel_console kernel_console;4 kernel_tls kernel_tls;5 kernel_thread kernel_thread;6 kernel_task kernel_task;7 kernel_program kernel_program;8 kernel_futex kernel_futex;9 kernel_smc kernel_smc;10 kernel_as kernel_as;11 kernel_ipc kernel_sys;12 kernel_event kernel_event;13 kernel_cap kernel_cap;14 kernel_ddi kernel_ddi;15 kernel_sysinfo kernel_sysinfo;16 kernel_debug kernel_debug;2 sys_klog sys_klog; 3 sys_console sys_console; 4 sys_tls sys_tls; 5 sys_thread sys_thread; 6 sys_task sys_task; 7 sys_program sys_program; 8 sys_futex sys_futex; 9 sys_smc sys_smc; 10 sys_as sys_as; 11 sys_ipc sys_ipc; 12 sys_event sys_event; 13 sys_cap sys_cap; 14 sys_ddi sys_ddi; 15 sys_sysinfo sys_sysinfo; 16 sys_debug sys_debug; -
contrib/arch/uspace/lib/libc/subsume
r57688fe2 rcf7b3e0 1 1 /* Subsume %% to kernel interfaces */ 2 subsume %%: kernel_klog to kernel_klog;3 subsume %%: kernel_console to kernel_console;4 subsume %%: kernel_tls to kernel_tls;5 subsume %%: kernel_thread to kernel_thread;6 subsume %%: kernel_task to kernel_task;7 subsume %%: kernel_program to kernel_program;8 subsume %%: kernel_futex to kernel_futex;9 subsume %%: kernel_smc to kernel_smc;10 subsume %%: kernel_as to kernel_as;11 subsume %%: kernel_ipc to kernel_sys;12 subsume %%: kernel_event to kernel_event;13 subsume %%: kernel_cap to kernel_cap;14 subsume %%: kernel_ddi to kernel_ddi;15 subsume %%: kernel_sysinfo to kernel_sysinfo;16 subsume %%: kernel_debug to kernel_debug;2 subsume %%:sys_klog to sys_klog; 3 subsume %%:sys_console to sys_console; 4 subsume %%:sys_tls to sys_tls; 5 subsume %%:sys_thread to sys_thread; 6 subsume %%:sys_task to sys_task; 7 subsume %%:sys_program to sys_program; 8 subsume %%:sys_futex to sys_futex; 9 subsume %%:sys_smc to sys_smc; 10 subsume %%:sys_as to sys_as; 11 subsume %%:sys_ipc to sys_ipc; 12 subsume %%:sys_event to sys_event; 13 subsume %%:sys_cap to sys_cap; 14 subsume %%:sys_ddi to sys_ddi; 15 subsume %%:sys_sysinfo to sys_sysinfo; 16 subsume %%:sys_debug to sys_debug; -
contrib/arch/uspace/lib/libfs/fnc.libfs_lookup
r57688fe2 rcf7b3e0 1 !fs.lookup* 1 ( 2 alternative fs tmpfs fat devfs { 3 !fs.lookup 4 } 5 )* -
contrib/arch/uspace/lib/libfs/fnc.libfs_mount
r57688fe2 rcf7b3e0 1 ?fs.ipc_m_connection_clone ; 2 ?fs.ipc_m_data_write /* mount options */ { 3 !fs.ipc_m_connect_to_me ; 4 !fs.mounted ; 5 !fs.ipc_m_data_write /* forward */ 1 ?ipc_m_connection_clone ; 2 ?ipc_m_data_write /* mount options */ { 3 alternative fs tmpfs fat devfs { 4 !fs.ipc_m_connect_to_me ; 5 !fs.mounted ; 6 !fs.ipc_m_data_write /* forward */ 7 } 6 8 } -
contrib/arch/uspace/srv/bd/bd.adl
r57688fe2 rcf7b3e0 1 1 interface bd extends service { 2 /* Establish connection */3 ipcarg_t ipc_m_connect_me_to(void);4 5 2 /* Share out data buffer */ 6 3 ipcarg_t ipc_m_share_out(in ipcarg_t as_area_base, in ipcarg_t as_area_size, in ipcarg_t flags, out ipcarg_t dst_as_area_base); … … 14 11 /* Write blocks via shared data buffer */ 15 12 ipcarg_t write_blocks(in ipcarg_t index_lower, in ipcarg_t index_upper, in ipcarg_t count); 16 17 /* Close connection */18 ipcarg_t ipc_m_phone_hungup(void);19 13 protocol: 20 14 [bd.bp] … … 26 20 [/uspace/lib/libc/subsume%rd] 27 21 28 delegate bd to rd:bd;22 delegate rd to rd:rd; 29 23 30 24 subsume rd:ns to ns; 31 subsume rd:devmap to devmap;25 subsume rd:devmap_driver to devmap_driver; 32 26 }; -
contrib/arch/uspace/srv/bd/rd/rd.adl
r57688fe2 rcf7b3e0 1 interface rd extends bd; 2 1 3 frame rd { 2 4 provides: 3 bd bd;5 rd rd; 4 6 requires: 5 7 [/uspace/lib/libc/requires] … … 7 9 devmap_driver devmap_driver; 8 10 protocol: 9 [/uspace/lib/libc/protocol] +11 [/uspace/lib/libc/protocol] | 10 12 [rd.bp] 11 13 }; -
contrib/arch/uspace/srv/fs/devfs/devfs.adl
r57688fe2 rcf7b3e0 1 interface devfs extends fs { 2 protocol: 3 [devfs.bp] 4 }; 5 1 6 frame devfs { 2 7 provides: 3 fsfs;8 devfs devfs; 4 9 requires: 5 10 [/uspace/lib/libc/requires] … … 9 14 service device; 10 15 protocol: 11 [/uspace/lib/libc/protocol] +16 [/uspace/lib/libc/protocol] | 12 17 [devfs_server.bp] 13 18 }; -
contrib/arch/uspace/srv/fs/devfs/devfs_server.bp
r57688fe2 rcf7b3e0 1 1 [/uspace/lib/libc/fnc.devmap_get_phone] ; 2 2 !ns.ipc_m_connect_me_to /* vfs */ ; 3 [/uspace/lib/libfs/fnc.fs_register] ; 4 ( 5 ?fs.ipc_m_connect_me_to ; 6 ( 7 ?fs.mounted { 8 ?fs.ipc_m_data_write /* mount options */ 9 } + 10 11 ?fs.lookup { 12 tentative { 13 [/uspace/lib/libc/fnc.devmap_device_get_handle] ; 14 tentative { 15 [/uspace/lib/libc/fnc.devmap_device_connect] 16 } 17 } 18 } + 19 20 ?fs.open_node { 21 tentative { 22 [/uspace/lib/libc/fnc.devmap_device_connect] 23 } 24 } + 25 26 ?fs.read { 27 tentative { 28 ?fs.ipc_m_data_read /* payload */ { 29 !device.read { 30 !device.ipc_m_data_read /* forward */ 31 } 32 } + 33 ( 34 [/uspace/lib/libc/fnc.devmap_device_get_count] ; 35 [/uspace/lib/libc/fnc.devmap_device_get_devices] 36 ) 37 } 38 } + 39 40 ?fs.write { 41 tentative { 42 ?fs.ipc_m_data_write /* payload */ { 43 !device.write { 44 !device.ipc_m_data_write /* forward */ 45 } 46 } 47 } 48 } + 49 50 ?fs.stat { 51 ?fs.ipc_m_data_read /* struct data */ 52 } + 53 54 ?fs.close { 55 !device.ipc_m_phone_hungup 56 } + 57 58 ?fs.mount + 59 ?fs.truncate + 60 ?fs.destroy + 61 ?fs.sync 62 )* ; 63 ?fs.ipc_m_phone_hungup 64 )* ; 65 !vfs.ipc_m_phone_hungup 3 [/uspace/lib/libfs/fnc.fs_register] -
contrib/arch/uspace/srv/fs/fat/fat.adl
r57688fe2 rcf7b3e0 1 interface fat extends fs { 2 protocol: 3 [fat.bp] 4 }; 5 1 6 frame fat { 2 7 provides: 3 f s fs;8 fat fat; 4 9 requires: 5 10 [/uspace/lib/libc/requires] 6 11 vfs vfs; 7 12 ns ns; 8 bd bd;13 rd rd; 9 14 protocol: 10 [/uspace/lib/libc/protocol] +15 [/uspace/lib/libc/protocol] | 11 16 [fat_server.bp] 12 17 }; -
contrib/arch/uspace/srv/fs/fat/fat_server.bp
r57688fe2 rcf7b3e0 1 1 !ns.ipc_m_connect_me_to /* vfs */ ; 2 [/uspace/lib/libfs/fnc.fs_register] ; 3 ( 4 ?fs.ipc_m_connect_me_to ; 5 ( 6 ?fs.mounted { 7 ?fs.ipc_m_data_write /* mount options */ 8 } + 9 10 ?fs.mount { 11 [/uspace/lib/libfs/fnc.libfs_mount] 12 } + 13 14 ?fs.lookup { 15 [/uspace/lib/libfs/fnc.libfs_lookup] 16 } + 17 18 ?fs.open_node { 19 [/uspace/lib/libfs/fnc.libfs_open_node] 20 } + 21 22 ?fs.read { 23 tentative { 24 ?fs.ipc_m_data_read /* payload */ 25 } 26 } + 27 28 ?fs.write { 29 tentative { 30 ?fs.ipc_m_data_write /* payload */ 31 } 32 } + 33 34 ?fs.stat { 35 [/uspace/lib/libfs/fnc.libfs_stat] 36 } + 37 38 ?fs.truncate + 39 ?fs.close + 40 ?fs.destroy + 41 ?fs.sync 42 )* ; 43 ?fs.ipc_m_phone_hungup 44 )* ; 45 !vfs.ipc_m_phone_hungup 2 [/uspace/lib/libfs/fnc.fs_register] -
contrib/arch/uspace/srv/fs/tmpfs/tmpfs.adl
r57688fe2 rcf7b3e0 1 interface tmpfs extends fs { 2 protocol: 3 [tmpfs.bp] 4 }; 5 1 6 frame tmpfs { 2 7 provides: 3 fsfs;8 tmpfs tmpfs; 4 9 requires: 5 10 [/uspace/lib/libc/requires] 6 11 vfs vfs; 7 12 ns ns; 8 bd bd;13 rd rd; 9 14 protocol: 10 [/uspace/lib/libc/protocol] +15 [/uspace/lib/libc/protocol] | 11 16 [tmpfs_server.bp] 12 17 }; -
contrib/arch/uspace/srv/fs/tmpfs/tmpfs_server.bp
r57688fe2 rcf7b3e0 1 1 !ns.ipc_m_connect_me_to /* vfs */ ; 2 [/uspace/lib/libfs/fnc.fs_register] ; 3 ( 4 ?fs.ipc_m_connect_me_to ; 5 ( 6 ?fs.mounted { 7 ?fs.ipc_m_data_write /* mount options */ 8 } + 9 10 ?fs.mount { 11 [/uspace/lib/libfs/fnc.libfs_mount] 12 } + 13 14 ?fs.lookup { 15 [/uspace/lib/libfs/fnc.libfs_lookup] 16 } + 17 18 ?fs.open_node { 19 [/uspace/lib/libfs/fnc.libfs_open_node] 20 } + 21 22 ?fs.read { 23 tentative { 24 ?fs.ipc_m_data_read /* payload */ 25 } 26 } + 27 28 ?fs.write { 29 tentative { 30 ?fs.ipc_m_data_write /* payload */ 31 } 32 } + 33 34 ?fs.stat { 35 [/uspace/lib/libfs/fnc.libfs_stat] 36 } + 37 38 ?fs.truncate + 39 ?fs.close + 40 ?fs.destroy + 41 ?fs.sync 42 )* ; 43 ?fs.ipc_m_phone_hungup 44 )* ; 45 !vfs.ipc_m_phone_hungup 2 [/uspace/lib/libfs/fnc.fs_register] -
contrib/arch/uspace/srv/kbd/kbd.adl
r57688fe2 rcf7b3e0 1 1 interface kbd extends service { 2 /* Establish connection */3 ipcarg_t ipc_m_connect_me_to(void);4 5 2 /* Callback connection */ 6 3 ipcarg_t ipc_m_connect_to_me(void); … … 11 8 /* Reclaim hardware */ 12 9 ipcarg_t reclaim(void); 13 14 /* Close connection */15 ipcarg_t ipc_m_phone_hungup(void);16 10 protocol: 17 11 [kbd.bp] … … 33 27 ns ns; 34 28 protocol: 35 [/uspace/lib/libc/protocol] +29 [/uspace/lib/libc/protocol] | 36 30 [kbd_server.bp] 37 31 }; -
contrib/arch/uspace/srv/loader/loader.adl
r57688fe2 rcf7b3e0 1 1 interface loader extends service { 2 /* Establish connection */3 ipcarg_t ipc_m_connect_me_to(void);4 5 2 /* Set task pathname */ 6 3 ipcarg_t set_pathname(in_copy string pathname); … … 20 17 /* Run binary */ 21 18 ipcarg_t run(void); 22 23 /* Close connection */24 ipcarg_t ipc_m_phone_hungup(void);25 19 protocol: 26 20 [loader.bp] … … 34 28 ns ns; 35 29 protocol: 36 [/uspace/lib/libc/protocol] +30 [/uspace/lib/libc/protocol] | 37 31 [loader_server.bp] 38 32 }; -
contrib/arch/uspace/srv/ns/service.adl
r57688fe2 rcf7b3e0 3 3 (this call is forwarded from Naming Service or Device Mapper) */ 4 4 ipcarg_t ipc_m_connect_me_to(void); 5 6 /* Close connection */ 7 ipcarg_t ipc_m_phone_hungup(void); 5 8 }; -
contrib/arch/uspace/srv/pci/pci.adl
r57688fe2 rcf7b3e0 1 1 interface pci extends service { 2 /* Establish connection */3 ipcarg_t ipc_m_connect_me_to(void);4 5 /* Close connection */6 ipcarg_t ipc_m_phone_hungup(void);7 2 protocol: 8 3 [pci.bp] … … 16 11 ns ns; 17 12 protocol: 18 [/uspace/lib/libc/protocol] +13 [/uspace/lib/libc/protocol] | 19 14 [pci_server.bp] 20 15 }; -
contrib/arch/uspace/srv/vfs/vfs.adl
r57688fe2 rcf7b3e0 1 1 interface vfs extends service { 2 /* Establish connection */3 ipcarg_t ipc_m_connect_me_to(void);4 5 2 /* Register a filesystem driver */ 6 3 ipcarg_t register(in_copy string name); … … 55 52 56 53 interface fs extends service { 57 /* Establish connection */58 ipcarg_t ipc_m_connect_me_to(void);59 60 54 /* Notify filesystem that it was mounted */ 61 55 ipcarg_t mounted(in ipcarg_t dev_handle, in_copy string opts); … … 87 81 /* Notify on file close */ 88 82 ipcarg_t close(in ipcarg_t dev_handle, in ipcarg_t fs_index); 89 90 /* Close connection */91 ipcarg_t ipc_m_phone_hungup(void);92 83 }; 93 84 94 frame vfs_manager {85 frame dispatcher { 95 86 provides: 96 87 vfs vfs; 97 88 requires: 98 89 [/uspace/lib/libc/requires] 99 fs fs; 90 tmpfs tmpfs; 91 fat fat; 92 devfs devfs; 100 93 ns ns; 101 94 protocol: 102 [/uspace/lib/libc/protocol] +95 [/uspace/lib/libc/protocol] | 103 96 [vfs_server.bp] 104 97 }; 105 98 106 99 architecture vfs { 107 inst vfs_manager vfs;100 inst dispatcher dispatcher; 108 101 inst tmpfs tmpfs; 109 102 inst fat fat; 110 103 inst devfs devfs; 111 104 112 bind vfs:fs to tmpfs:fs;113 bind vfs:fs to fat:fs;114 bind vfs:fs to devfs:fs;105 bind dispatcher:tmpfs to tmpfs:tmpfs; 106 bind dispatcher:fat to fat:fat; 107 bind dispatcher:devfs to devfs:devfs; 115 108 116 bind tmpfs:vfs to vfs:vfs;117 bind fat:vfs to vfs:vfs;118 bind devfs:vfs to vfs:vfs;109 bind tmpfs:vfs to dispatcher:vfs; 110 bind fat:vfs to dispatcher:vfs; 111 bind devfs:vfs to dispatcher:vfs; 119 112 120 delegate vfs to vfs:vfs;113 delegate vfs to dispatcher:vfs; 121 114 122 [/uspace/lib/libc/subsume% vfs]115 [/uspace/lib/libc/subsume%dispatcher] 123 116 [/uspace/lib/libc/subsume%tmpfs] 124 117 [/uspace/lib/libc/subsume%fat] 125 118 [/uspace/lib/libc/subsume%devfs] 126 119 127 subsume vfs:ns to ns;120 subsume dispatcher:ns to ns; 128 121 subsume tmpfs:ns to ns; 129 122 subsume fat:ns to ns; 130 123 subsume devfs:ns to ns; 131 124 132 subsume tmpfs: bd to bd;133 subsume fat: bd to bd;125 subsume tmpfs:rd to rd; 126 subsume fat:rd to rd; 134 127 135 128 subsume devfs:devmap_client to devmap_client; -
contrib/arch/uspace/srv/vfs/vfs.bp
r57688fe2 rcf7b3e0 21 21 ( 22 22 /* root fs */ 23 !fs.mounted ; 24 !fs.ipc_m_data_write /* mount options */ 23 alternative fs tmpfs fat devfs { 24 !fs.mounted ; 25 !fs.ipc_m_data_write /* mount options */ 26 } 25 27 ) + 26 28 ( 27 29 /* non-root fs */ 28 30 tentative { 29 [fnc.vfs_lookup_internal] ; 30 tentative { 31 [fnc.vfs_grab_phone] ; 32 [fnc.vfs_grab_phone] ; 33 !fs.mount ; 34 !fs.ipc_m_connection_clone ; 35 [fnc.vfs_release_phone] ; 31 alternative fs tmpfs fat devfs { 32 [fnc.vfs_lookup_internal] ; 36 33 tentative { 37 !fs.vfs_m_data_write /* mount options */ 38 } ; 39 [fnc.vfs_release_phone] 34 [fnc.vfs_grab_phone] ; 35 [fnc.vfs_grab_phone] ; 36 !fs.mount ; 37 !fs.ipc_m_connection_clone ; 38 [fnc.vfs_release_phone] ; 39 tentative { 40 !fs.vfs_m_data_write /* mount options */ 41 } ; 42 [fnc.vfs_release_phone] 43 } 40 44 } 41 45 } … … 51 55 ?ipc_m_data_write /* path */ ; 52 56 tentative { 53 [fnc.vfs_lookup_internal] ; 54 tentative { 57 alternative fs tmpfs fat devfs { 58 [fnc.vfs_lookup_internal] ; 59 tentative { 60 [fnc.vfs_grab_phone] ; 61 !fs.truncate ; 62 [fnc.vfs_release_phone] 63 } 64 } 65 } 66 } 67 } + 68 69 ?open_node { 70 alternative fs tmpfs fat devfs { 71 [fnc.vfs_open_node_internal] ; 72 tentative { 73 [fnc.vfs_grab_phone] ; 74 !fs.truncate ; 75 [fnc.vfs_release_phone] 76 } 77 } 78 } + 79 80 ?close { 81 tentative { 82 alternative fs tmpfs fat devfs { 83 [fnc.vfs_grab_phone] ; 84 !fs.close ; 85 [fnc.vfs_release_phone] 86 } 87 } 88 } + 89 90 ?read { 91 tentative { 92 ?ipc_m_data_read { 93 alternative fs tmpfs fat devfs { 55 94 [fnc.vfs_grab_phone] ; 56 !fs.truncate ; 95 !fs.read ; 96 !fs.ipc_m_data_read /* forward payload */ ; 57 97 [fnc.vfs_release_phone] 58 98 } … … 61 101 } + 62 102 63 ?open_node { 64 [fnc.vfs_open_node_internal] ; 65 tentative { 66 [fnc.vfs_grab_phone] ; 67 !fs.truncate ; 68 [fnc.vfs_release_phone] 69 } 70 } + 71 72 ?close { 73 tentative { 74 [fnc.vfs_grab_phone] ; 75 !fs.close ; 76 [fnc.vfs_release_phone] 77 } 78 } + 79 80 ?read { 81 tentative { 82 ?ipc_m_data_read { 103 ?write { 104 tentative { 105 ?ipc_m_data_write { 106 alternative fs tmpfs fat devfs { 107 [fnc.vfs_grab_phone] ; 108 !fs.write ; 109 !fs.ipc_m_data_write /* forward payload */ ; 110 [fnc.vfs_release_phone] 111 } 112 } 113 } 114 } + 115 116 ?truncate { 117 tentative { 118 alternative fs tmpfs fat devfs { 83 119 [fnc.vfs_grab_phone] ; 84 !fs.read ; 85 !fs.ipc_m_data_read /* forward payload */ ; 120 !fs.truncate ; 86 121 [fnc.vfs_release_phone] 87 122 } … … 89 124 } + 90 125 91 ?write {92 tentative {93 ?ipc_m_data_write {94 [fnc.vfs_grab_phone] ;95 !fs.write ;96 !fs.ipc_m_data_write /* forward payload */ ;97 [fnc.vfs_release_phone]98 }99 }100 } +101 102 ?truncate {103 tentative {104 [fnc.vfs_grab_phone] ;105 !fs.truncate ;106 [fnc.vfs_release_phone]107 }108 } +109 110 126 ?fstat { 111 127 tentative { 112 128 ?ipc_m_data_read /* struct stat */ { 113 [fnc.vfs_grab_phone] ; 114 !fs.stat ; 115 !fs.ipc_m_data_read /* forward struct stat */ ; 116 [fnc.vfs_release_phone] 129 alternative fs tmpfs fat devfs { 130 [fnc.vfs_grab_phone] ; 131 !fs.stat ; 132 !fs.ipc_m_data_read /* forward struct stat */ ; 133 [fnc.vfs_release_phone] 134 } 117 135 } 118 136 } … … 123 141 tentative { 124 142 ?ipc_m_data_read /* struct stat */ { 125 [fnc.vfs_lookup_internal] ; 126 tentative { 127 !fs.stat ; 128 !fs.ipc_m_data_read /* forward struct stat */ 143 alternative fs tmpfs fat devfs { 144 [fnc.vfs_lookup_internal] ; 145 tentative { 146 !fs.stat ; 147 !fs.ipc_m_data_read /* forward struct stat */ 148 } 129 149 } 130 150 } … … 135 155 ?ipc_m_data_write /* path */ ; 136 156 tentative { 137 [fnc.vfs_lookup_internal] 157 alternative fs tmpfs fat devfs { 158 [fnc.vfs_lookup_internal] 159 } 138 160 } 139 161 } + … … 142 164 ?ipc_m_data_write /* path */ ; 143 165 tentative { 144 [fnc.vfs_lookup_internal] 166 alternative fs tmpfs fat devfs { 167 [fnc.vfs_lookup_internal] 168 } 145 169 } 146 170 } + … … 151 175 ?ipc_m_data_write /* new path */ ; 152 176 tentative { 153 [fnc.vfs_lookup_internal] /* lookup old path */ ; 154 tentative { 155 [fnc.vfs_lookup_internal] /* lookup parent of new path */ ; 156 tentative { 157 [fnc.vfs_lookup_internal] /* destroy old link for the new path */ ; 177 alternative fs tmpfs fat devfs { 178 [fnc.vfs_lookup_internal] /* lookup old path */ ; 179 tentative { 180 [fnc.vfs_lookup_internal] /* lookup parent of new path */ ; 158 181 tentative { 159 [fnc.vfs_lookup_internal] /* create newlink for the new path */ ;182 [fnc.vfs_lookup_internal] /* destroy old link for the new path */ ; 160 183 tentative { 161 [fnc.vfs_lookup_internal] /* destroy link for the old path */ 184 [fnc.vfs_lookup_internal] /* create new link for the new path */ ; 185 tentative { 186 [fnc.vfs_lookup_internal] /* destroy link for the old path */ 187 } 162 188 } 163 189 } … … 170 196 ?sync { 171 197 tentative { 172 !fs.sync 198 alternative fs tmpfs fat devfs { 199 !fs.sync 200 } 173 201 } 174 202 } + -
contrib/highlight/bp.syntax
r57688fe2 rcf7b3e0 5 5 keyword whole NULL yellow 6 6 keyword whole tentative yellow 7 keyword whole alternative yellow 7 8 8 9 keyword /\* brown
Note:
See TracChangeset
for help on using the changeset viewer.