Orbital (#16)
* Port previous ethernet scheme * Add ipd * Fix initfs rebuilds, use QEMU user networking addresses in ipd * Add tcp/udp, netutils, dns, and network config * Add fsync to network driver * Add dns, router, subnet by default * Fix e1000 driver. Make ethernet and IP non-blocking to avoid deadlocks * Add orbital server, WIP * Add futex * Add orbutils and orbital * Update libstd, orbutils, and orbital Move ANSI key encoding to vesad * Add orbital assets * Update orbital * Update to add login manager * Add blocking primitives, block for most things except waitpid, update orbital * Wait in waitpid and IRQ, improvements for other waits * Fevent in root scheme * WIP: Switch to using fevent * Reorganize * Event based e1000d driver * Superuser-only access to some network schemes, display, and disk * Superuser root and irq schemes * Fix orbital
This commit is contained in:
parent
372d44f88c
commit
224c43f761
92 changed files with 3415 additions and 473 deletions
|
|
@ -1,11 +1,12 @@
|
|||
use alloc::arc::{Arc, Weak};
|
||||
use collections::{BTreeMap, VecDeque};
|
||||
use spin::{Mutex, Once, RwLock, RwLockReadGuard, RwLockWriteGuard};
|
||||
use collections::BTreeMap;
|
||||
use spin::{Once, RwLock, RwLockReadGuard, RwLockWriteGuard};
|
||||
|
||||
use context;
|
||||
use sync::WaitQueue;
|
||||
use syscall::data::Event;
|
||||
|
||||
type EventList = Weak<Mutex<VecDeque<Event>>>;
|
||||
type EventList = Weak<WaitQueue<Event>>;
|
||||
|
||||
type Registry = BTreeMap<(usize, usize), BTreeMap<(usize, usize), EventList>>;
|
||||
|
||||
|
|
@ -67,9 +68,8 @@ pub fn trigger(scheme_id: usize, id: usize, flags: usize, data: usize) {
|
|||
let registry = registry();
|
||||
if let Some(event_lists) = registry.get(&(scheme_id, id)) {
|
||||
for entry in event_lists.iter() {
|
||||
if let Some(event_list_lock) = entry.1.upgrade() {
|
||||
let mut event_list = event_list_lock.lock();
|
||||
event_list.push_back(Event {
|
||||
if let Some(event_list) = entry.1.upgrade() {
|
||||
event_list.send(Event {
|
||||
id: (entry.0).1,
|
||||
flags: flags,
|
||||
data: data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue