18 months ago | Paul Boddie | file changeset files shortlog | On MIPS32, at least, in a payload started by libexec, the main thread is not necessarily returned correctly by pthread_l4_cap(pthread_self()). So a workaround is used when a server is initialised for the main thread. |
paul@0 | 1 | -- vim:set ft=lua: |
paul@0 | 2 | |
paul@0 | 3 | local L4 = require("L4"); |
paul@0 | 4 | |
paul@0 | 5 | local l = L4.default_loader; |
paul@0 | 6 | |
paul@507 | 7 | local host_server = l:new_channel(); |
paul@0 | 8 | |
paul@84 | 9 | l:startv({ |
paul@0 | 10 | caps = { |
paul@507 | 11 | fsserver = host_server:svr(), |
paul@0 | 12 | }, |
paul@0 | 13 | log = { "server", "r" }, |
paul@0 | 14 | }, |
paul@394 | 15 | "rom/host_server", "10"); |
paul@0 | 16 | |
paul@18 | 17 | l:startv({ |
paul@0 | 18 | caps = { |
paul@507 | 19 | fsserver = host_server, |
paul@0 | 20 | }, |
paul@0 | 21 | log = { "client", "g" }, |
paul@0 | 22 | }, |
paul@402 | 23 | "rom/dstest_host_client", "rom/dstest_host_client.cfg", 1024, 1024); |