Changeset ea5f46d in mainline
- Timestamp:
- 2009-09-15T16:07:26Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2a70672
- Parents:
- 1993f9a
- Location:
- contrib
- Files:
-
- 16 added
- 5 deleted
- 13 edited
- 5 moved
Legend:
- Unmodified
- Added
- Removed
-
contrib/arch/HelenOS.adl
r1993f9a rea5f46d 6 6 inst ns ns; 7 7 8 /* RAM disk*/9 inst rd rd;8 /* Loader (clonable service) */ 9 inst loader loader; 10 10 11 /* Klog */ 11 /* Block device */ 12 inst bd bd; 13 14 /* VFS server */ 15 inst vfs vfs; 16 17 /* Console */ 18 inst console console; 19 20 /* Kernel log */ 12 21 inst klog klog; 13 22 14 /* VFS */ 15 inst vfs vfs; 23 [/uspace/lib/libc/bind%ns] 24 [/uspace/lib/libc/bind%loader] 25 [/uspace/lib/libc/bind%bd] 26 [/uspace/lib/libc/bind%vfs] 27 [/uspace/lib/libc/bind%console] 28 [/uspace/lib/libc/bind%klog] 16 29 17 [/uspace/lib/libc/bind%ns]30 bind loader:ns to ns:ns; 18 31 19 [/uspace/lib/libc/bind%rd] 20 bind rd:ns to ns:ns; 21 bind rd:dm_driver to devmap:dm_driver; 32 bind bd:ns to ns:ns; 33 bind bd:devmap_driver to devmap:devmap_driver; 22 34 23 [/uspace/lib/libc/bind%klog] 35 bind vfs:ns to ns:ns; 36 bind vfs:bd to bd:bd; 37 bind vfs:devmap_client to devmap:devmap_client; 38 bind vfs:device to console:console; 39 40 bind console:ns to ns:ns; 41 24 42 bind klog:ns to ns:ns; 25 26 [/uspace/lib/libc/bind%vfs]27 bind vfs:ns to ns:ns;28 43 }; -
contrib/arch/kernel/kernel.adl
r1993f9a rea5f46d 7 7 unative_t sys_klog(int fd, const void *buf, size_t size); 8 8 protocol: 9 ?sys_klog *9 ?sys_klog 10 10 }; 11 11 … … 17 17 uintptr_t sys_debug_disable_console(void); 18 18 protocol: 19 (?sys_debug_enable_console + ?sys_debug_disable_console)* 19 ?sys_debug_enable_console + 20 ?sys_debug_disable_console 20 21 }; 21 22 … … 24 25 unative_t sys_tls_set(unative_t addr); 25 26 protocol: 26 ?sys_tls_set *27 ?sys_tls_set 27 28 }; 28 29 … … 37 38 unative_t sys_thread_get_id(thread_id_t *uspace_thread_id); 38 39 protocol: 39 (?sys_thread_create + ?sys_thread_get_id)* ; ?sys_thread_exit 40 ( 41 ?sys_thread_create + 42 ?sys_thread_get_id 43 )* ; 44 ?sys_thread_exit 40 45 }; 41 46 … … 47 52 unative_t sys_task_get_id(task_id_t *uspace_task_id); 48 53 protocol: 49 (?sys_task_set_name + ?sys_task_get_id)* 54 ?sys_task_set_name + 55 ?sys_task_get_id 50 56 }; 51 57 … … 54 60 unative_t sys_program_spawn_loader(char *uspace_name, size_t name_len); 55 61 protocol: 56 ?sys_program_spawn_loader *62 ?sys_program_spawn_loader 57 63 }; 58 64 … … 64 70 unative_t sys_futex_wakeup(uintptr_t uaddr); 65 71 protocol: 66 (?sys_futex_sleep_timeout + ?sys_futex_wakeup)* 72 ?sys_futex_sleep_timeout + 73 ?sys_futex_wakeup 67 74 }; 68 75 … … 71 78 unative_t sys_smc_coherence(uintptr_t va, size_t size); 72 79 protocol: 73 ?sys_smc_coherence *80 ?sys_smc_coherence 74 81 }; 75 82 … … 87 94 unative_t sys_as_area_destroy(uintptr_t address); 88 95 protocol: 89 (?sys_as_area_create + ?sys_as_area_resize + ?sys_as_area_change_flags + ?sys_as_area_destroy)* 96 ?sys_as_area_create + 97 ?sys_as_area_resize + 98 ?sys_as_area_change_flags + 99 ?sys_as_area_destroy 90 100 }; 91 101 … … 124 134 unative_t sys_ipc_poke(void); 125 135 protocol: 126 (?sys_ipc_call_sync_fast + ?sys_ipc_call_sync_slow + ?sys_ipc_call_async_fast + ?sys_ipc_call_async_slow + ?sys_ipc_forward_fast + ?sys_ipc_forward_slow + ?sys_ipc_answer_fast + ?sys_ipc_answer_slow + ?sys_ipc_hangup + ?sys_ipc_wait_for_call + ?sys_ipc_poke)* 136 ?sys_ipc_call_sync_fast + 137 ?sys_ipc_call_sync_slow + 138 ?sys_ipc_call_async_fast + 139 ?sys_ipc_call_async_slow + 140 ?sys_ipc_forward_fast + 141 ?sys_ipc_forward_slow + 142 ?sys_ipc_answer_fast + 143 ?sys_ipc_answer_slow + 144 ?sys_ipc_hangup + 145 ?sys_ipc_wait_for_call + 146 ?sys_ipc_poke 127 147 }; 128 148 … … 131 151 unative_t sys_event_subscribe(unative_t evno, unative_t method); 132 152 protocol: 133 ?sys_event_subscribe *153 ?sys_event_subscribe 134 154 }; 135 155 … … 141 161 unative_t sys_cap_revoke(sysarg64_t *uspace_taskid_arg, cap_t caps); 142 162 protocol: 143 (?sys_cap_grant + ?sys_cap_rewoke)* 163 ?sys_cap_grant + 164 ?sys_cap_rewoke 144 165 }; 145 166 … … 163 184 unative_t sys_ipc_unregister_irq(inr_t inr, devno_t devno); 164 185 protocol: 165 (?sys_enable_iospace + ?sys_physmem_map + ?sys_device_assign_devno + ?sys_preempt_control + ?sys_ipc_register_irq + ?sys_ipc_unregister_irq)* 186 ?sys_enable_iospace + 187 ?sys_physmem_map + 188 ?sys_device_assign_devno + 189 ?sys_preempt_control + 190 ?sys_ipc_register_irq + 191 ?sys_ipc_unregister_irq 166 192 }; 167 193 … … 173 199 unative_t sys_sysinfo_value(unatice_t ptr, unative_t len); 174 200 protocol: 175 (?sys_sysinfo_valid + ?sys_sysinfo_value)* 201 ?sys_sysinfo_valid + 202 ?sys_sysinfo_value 176 203 }; 177 204 … … 180 207 unative_t sys_ipc_connect_kbox(sysarg64_t *uspace_taskid_arg); 181 208 protocol: 182 ?sys_ipc_connect_kbox *209 ?sys_ipc_connect_kbox 183 210 }; 184 211 -
contrib/arch/uspace/app/klog/klog.adl
r1993f9a rea5f46d 2 2 requires: 3 3 naming_service ns; 4 [/uspace/lib/libc/requires ]4 [/uspace/lib/libc/requires%] 5 5 protocol: 6 6 [/uspace/lib/libc/protocol] + -
contrib/arch/uspace/lib/libc/bind
r1993f9a rea5f46d 1 /* Bind ingsto kernel interfaces */1 /* Bind %% to kernel interfaces */ 2 2 bind %%:kernel_klog to kernel:kernel_klog; 3 3 bind %%:kernel_console to kernel:kernel_console; -
contrib/arch/uspace/srv/bd/bd.adl
r1993f9a rea5f46d 1 interface b lock_deviceextends service {1 interface bd extends service { 2 2 /* Establish connection */ 3 3 ipcarg_t ipc_m_connect_me_to(void); … … 18 18 ipcarg_t ipc_m_phone_hungup(void); 19 19 protocol: 20 [b lock_device.bp]20 [bd.bp] 21 21 }; 22 23 architecture bd { 24 inst rd rd; 25 26 [/uspace/lib/libc/subsume%rd] 27 28 delegate bd to rd:bd; 29 30 subsume rd:ns to ns; 31 subsume rd:devmap to devmap; 32 }; -
contrib/arch/uspace/srv/bd/rd/rd.adl
r1993f9a rea5f46d 1 1 frame rd { 2 2 provides: 3 b lock_devicebd;3 bd bd; 4 4 requires: 5 5 [/uspace/lib/libc/requires%] 6 n aming_servicens;7 dev ice_mapper_driver dm_driver;6 ns ns; 7 devmap_driver devmap_driver; 8 8 protocol: 9 9 [/uspace/lib/libc/protocol] + -
contrib/arch/uspace/srv/devmap/devmap.adl
r1993f9a rea5f46d 1 interface dev ice_mapper_driver {1 interface devmap_driver { 2 2 /* Establish connection (iface is DEVMAP_DRIVER) */ 3 3 ipcarg_t ipc_m_connect_me_to(in ipcarg_t iface); … … 24 24 ipcarg_t ipc_m_phone_hungup(void); 25 25 protocol: 26 [dev ice_mapper_driver.bp]26 [devmap_driver.bp] 27 27 }; 28 28 29 interface dev ice_mapper_client {29 interface devmap_client { 30 30 /* Establish connection (iface is DEVMAP_CLIENT) or forward to device (iface is DEVMAP_CONNECT_TO_DEVICE) */ 31 31 ipcarg_t ipc_m_connect_me_to(in ipcarg_t iface, in ipcarg_t handle); … … 52 52 ipcarg_t ipc_m_phone_hungup(void); 53 53 protocol: 54 [dev ice_mapper_client.bp]54 [devmap_client.bp] 55 55 56 56 }; … … 58 58 frame devmap { 59 59 provides: 60 dev ice_mapper_driver dm_driver;61 dev ice_mapper_client dm_client;60 devmap_driver devmap_driver; 61 devmap_client devmap_client; 62 62 requires: 63 63 [/uspace/lib/libc/requires%] 64 64 protocol: 65 [devmap .bp]65 [devmap_server.bp] 66 66 }; -
contrib/arch/uspace/srv/kbd/kbd.bp
r1993f9a rea5f46d 1 ?ipc_m_connect_me_to ; 1 2 ( 2 !ns.IPC_M_CONNECT_ME_TO /* cir */ + 3 NULL 4 ) ; 5 !ns.IPC_M_CONNECT_TO_ME ; 6 ( 7 ?kbd.IPC_M_CONNECT_ME_TO ; 8 ( 9 ( 10 ?kbd.KBD_YIELD + 11 ?kbd.KBD_RECLAIM + 12 ) | 13 !console.KBD_EVENT 14 )* ; 15 ?kbd.IPC_M_PHONE_HUNGUP 3 ?ipc_m_connect_to_me + 4 ?yield + 5 ?reclam 16 6 )* ; 17 ( 18 !cir.IPC_M_PHONE_HUNGUP + 19 NULL 20 ) 7 ?ipc_m_phone_hungup -
contrib/arch/uspace/srv/loader/loader.bp
r1993f9a rea5f46d 1 !ns.NS_ID_INTRO ;2 !ns.IPC_M_CONNECT_TO_ME ;3 1 ( 4 ? loader.LOADER_GET_TASKID{5 ? loader.IPC_M_DATA_READ /* task id*/2 ?get_taskid { 3 ?ipc_m_data_read /* task ID */ 6 4 } + 7 5 8 ? loader.LOADER_SET_PATHNAME{9 ? loader.IPC_M_DATA_WRITE /* path*/6 ?set_pathname { 7 ?ipc_m_data_write /* pathname */ 10 8 } + 11 9 12 ? loader.LOADER_SET_ARGS{13 ? loader.IPC_M_DATA_WRITE/* arguments */10 ?set_args { 11 ?ipc_m_data_write /* arguments */ 14 12 } + 15 13 16 ? loader.LOADER_SET_FILES{17 ? loader.IPC_M_DATA_WRITE/* files */14 ?set_files { 15 ?ipc_m_data_write /* files */ 18 16 } + 19 17 20 ?load er.LOADER_LOAD18 ?load 21 19 )* ; 22 20 ( 23 ? loader.LOADER_RUN+24 ? loader.IPC_M_PHONE_HUNGUP21 ?run + 22 ?ipc_m_phone_hungup 25 23 ) -
contrib/arch/uspace/srv/ns/ns.adl
r1993f9a rea5f46d 1 interface n aming_service{1 interface ns { 2 2 /* Register a clonable service or a generic service */ 3 3 ipcarg_t ipc_m_connect_to_me(in ipcarg_t service); … … 24 24 ipcarg_t ipc_m_phone_hungup(void); 25 25 protocol: 26 [n aming_service.bp]26 [ns.bp] 27 27 }; 28 28 29 29 frame ns { 30 30 provides: 31 n aming_servicens;31 ns ns; 32 32 requires: 33 33 [/uspace/lib/libc/requires] -
contrib/arch/uspace/srv/pci/pci.bp
r1993f9a rea5f46d 1 !ns.IPC_M_CONNECT_TO_ME ; 2 ( 3 ?pci.IPC_M_CONNECT_ME_TO ; 4 ?pci.IPC_M_PHONE_HUNGUP 5 )* 1 ?ipc_m_connect_me_to ; 2 ?ipc_m_phone_hungup -
contrib/arch/uspace/srv/vfs/vfs.adl
r1993f9a rea5f46d 1 interface vfs {1 interface vfs extends service { 2 2 /* Establish connection */ 3 3 ipcarg_t ipc_m_connect_me_to(void); … … 51 51 ipcarg_t ipc_m_phone_hungup(void); 52 52 protocol: 53 [v irtual_fs.bp]53 [vfs.bp] 54 54 }; 55 55 56 frame vfs { 56 interface fs extends service { 57 /* Establish connection */ 58 ipcarg_t ipc_m_connect_me_to(void); 59 60 /* Notify filesystem that it was mounted */ 61 ipcarg_t mounted(in ipcarg_t dev_handle, in_copy string opts); 62 63 /* Mount filesystem */ 64 ipcarg_t mount(in ipcarg_t device, in ipcarg_t flags, in_copy string point, in_copy string opts, ...); 65 66 /* Open file by node */ 67 ipcarg_t open_node(in ipcarg_t lflag, in ipcarg_t oflag, in ipcarg_t mode, ...); 68 69 /* Lookup file */ 70 ipcarg_t lookup(in ipcarg_t lflag, in ipcarg_t oflag, in ipcarg_t mode, ...); 71 72 /* Read data from file */ 73 ipcarg_t read(in ipcarg_t dev_handle, in ipcarg_t fs_index, in ipcarg_t offset, out_copy stream data); 74 75 /* Write data to file */ 76 ipcarg_t write(in ipcarg_t dev_handle, in ipcarg_t fs_index, in ipcarg_t offset, out_copy stream data); 77 78 /* Truncate file */ 79 ipcarg_t truncate(in ipcarg_t dev_handle, in ipcarg_t fs_index, in ipcarg_t size); 80 81 /* Get directory entry metadata */ 82 ipcarg_t stat(in ipcarg_t dev_handle, in ipcarg_t fs_index, out_copy stream stat); 83 84 /* Flush file buffers */ 85 ipcarg_t sync(in ipcarg_t dev_handle, in ipcarg_t fs_index); 86 87 /* Notify on file close */ 88 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 }; 93 94 frame vfs_manager { 57 95 provides: 58 96 vfs vfs; 59 97 requires: 60 98 [/uspace/lib/libc/requires%] 61 naming_service ns; 99 fs fs; 100 ns ns; 62 101 protocol: 63 102 [/uspace/lib/libc/protocol] + 64 [vfs .bp]103 [vfs_server.bp] 65 104 }; 105 106 architecture vfs { 107 inst vfs_manager vfs; 108 inst tmpfs tmpfs; 109 inst fat fat; 110 inst devfs devfs; 111 112 bind vfs:fs to tmpfs:fs; 113 bind vfs:fs to fat:fs; 114 bind vfs:fs to devfs:fs; 115 116 bind tmpfs:vfs to vfs:vfs; 117 bind fat:vfs to vfs:vfs; 118 bind devfs:vfs to vfs:vfs; 119 120 delegate vfs to vfs:vfs; 121 122 [/uspace/lib/libc/subsume%vfs] 123 [/uspace/lib/libc/subsume%tmpfs] 124 [/uspace/lib/libc/subsume%fat] 125 [/uspace/lib/libc/subsume%devfs] 126 127 subsume vfs:ns to ns; 128 subsume tmpfs:ns to ns; 129 subsume fat:ns to ns; 130 subsume devfs:ns to ns; 131 132 subsume tmpfs:bd to bd; 133 subsume fat:bd to bd; 134 135 subsume devfs:devmap_client to devmap_client; 136 subsume devfs:device to device; 137 }; -
contrib/arch/uspace/srv/vfs/vfs.bp
r1993f9a rea5f46d 1 !ns.ipc_m_connect_to_me 1 ?ipc_m_connect_me_to ; 2 ( 3 ?register { 4 ?ipc_m_data_write /* fs name */ ; 5 tentative { 6 /* callback connection */ 7 ?ipc_m_connect_to_me ; 8 ?ipc_m_share_in 9 } 10 } + 11 12 ?mount { 13 ?ipc_m_data_write /* mount point */ ; 14 tentative { 15 ?ipc_m_data_write /* mount options */ ; 16 tentative { 17 ?ipc_m_data_write /* fs name */ ; 18 tentative { 19 ?ipc_m_ping ; 20 tentative { 21 ( 22 /* root fs */ 23 !fs.mounted ; 24 !fs.ipc_m_data_write /* mount options */ 25 ) + 26 ( 27 /* non-root fs */ 28 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] ; 36 tentative { 37 !fs.vfs_m_data_write /* mount options */ 38 } 39 [fnc.vfs_release_phone] ; 40 } 41 } 42 ) 43 } 44 } 45 } 46 } 47 } + 48 49 ?open { 50 tentative { 51 ?ipc_m_data_write /* path */ ; 52 tentative { 53 [fnc.vfs_lookup_internal] ; 54 tentative { 55 [fnc.vfs_grab_phone] ; 56 !fs.truncate ; 57 [fnc.vfs_release_phone] 58 } 59 } 60 } 61 } + 62 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 { 83 [fnc.vfs_grab_phone] ; 84 !fs.read ; 85 !fs.ipc_m_data_read /* forward payload */ ; 86 [fnc.vfs_release_phone] 87 } 88 } 89 } + 90 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 ?fstat { 111 tentative { 112 ?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] 117 } 118 } 119 } + 120 121 ?stat { 122 ?ipc_m_data_write /* path */ ; 123 tentative { 124 ?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 */ 129 } 130 } 131 } 132 } + 133 134 ?mkdir { 135 ?ipc_m_data_write /* path */ ; 136 tentative { 137 [fnc.vfs_lookup_internal] 138 } 139 } + 140 141 ?unlink { 142 ?ipc_m_data_write /* path */ ; 143 tentative { 144 [fnc.vfs_lookup_internal] 145 } 146 } + 147 148 ?rename { 149 ?ipc_m_data_write /* old path */ ; 150 tentative { 151 ?ipc_m_data_write /* new path */ ; 152 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 */ ; 158 tentative { 159 [fnc.vfs_lookup_internal] /* create new link for the new path */ ; 160 tentative { 161 [fnc.vfs_lookup_internal] /* destroy link for the old path */ 162 } 163 } 164 } 165 } 166 } 167 } 168 } + 169 170 ?sync { 171 tentative { 172 !fs.sync 173 } 174 } + 175 176 ?seek 177 178 )* ; 179 ?ipc_m_phne_hungup -
contrib/highlight/bp.syntax
r1993f9a rea5f46d 4 4 context default 5 5 keyword whole NULL yellow 6 keyword whole try yellow7 keyword whole catch yellow8 6 keyword whole tentative yellow 9 7
Note:
See TracChangeset
for help on using the changeset viewer.