<bslsk05>
lwn.net: Suspend IRQs during application busy periods [LWN.net]
Lucretia has joined #osdev
cloudowind has quit [Ping timeout: 260 seconds]
cloudowind has joined #osdev
hwpplayer1 has quit [Quit: I'll be back later]
<GeDaMo>
I'm assuming a kernel thread is doing the polling could it still be interrupted by context switching interrupts?
hwpplayer1 has joined #osdev
<sortie>
cloudowind: Thanks for your kind words. You're more than welcome to hang in #sortix if you'd like, it's not a team-only channel, but for the community. Although the real channel is over on the irc.sortix.org network instead of libera :)
the_oz has quit [Remote host closed the connection]
<bslsk05>
github.com: linux/net/core/dev.c at aa22f4da2a46b484a257d167c67a2adc1b7aaf68 · torvalds/linux · GitHub
<ring0_starr>
what does this thing do?
xenos1984 has quit [Ping timeout: 246 seconds]
<GeDaMo>
Looks like that's the function which disables interrupts for the particular network device
<ring0_starr>
sure, but how
xenos1984 has joined #osdev
<GeDaMo>
Well, it's more that the interrupts are already disabled and this function checks if a timeout has been exceeded
<ring0_starr>
I see it acquire a lock, then lookup the napi object by instance id, then if it can't find it, it just silently aborts instead of logging an error, but otherwise it reads the timeout member from said object and then sets a timer
<ring0_starr>
yeah that's what I figured too, otherwise it wouldn't make any sense. but it already doesn't make sense if you go by the name, and btw there is no documentation on it
<GeDaMo>
The function that gets called by the timeout timer is napi_watchdog
<bslsk05>
wiki.osdev.org: What Order Should I Make Things In? - OSDev Wiki
agent314 has joined #osdev
agent314 has quit [Max SendQ exceeded]
<sortie>
osdev199: https://wiki.osdev.org/Creating_an_Operating_System is also my very high level tutorial on stuff. bash will require a whole bunch of stuff to get running. But you can get your own quick and dirty shell running with much less
<bslsk05>
wiki.osdev.org: Creating an Operating System - OSDev Wiki
agent314 has joined #osdev
<Ermine>
so answer is basically 1) write an os; 2) port bash
heat has joined #osdev
<heat>
Ermine, yep that's accurate
<heat>
the gang writes tty job control
<heat>
bash isn't actually That Hard if you know what you're doing
<sortie>
Ermine: Yes, which is why I explained what 1) means :)
<sortie>
Indeed. heat is right. bash is not the hardest port. You can even get far with some poorly mocked system calls.
<heat>
all of those shells kinda depend on the same thing, but bash's readline and stuff requires select() and a better terminal emulator+tty layer
<sortie>
osdev199: So if you tell us how much you have coded so far, we can guide you on what might make sense next
<heat>
dash is basically open + read + write + fork + exec + dup + pipes + memory allocation + wait + tty job control semantics
<heat>
bash is dash with select
<Ermine>
heat: bash on onyx when
<sortie>
I would go for dash as a first port but bash can be doable too
<heat>
Ermine, bash is available on onyx
<heat>
and actually my main shell
<Ermine>
\o/
<heat>
dash is so garbage once you get used to bash
<Ermine>
yes
<Ermine>
i'm bash user from the day 1
<Ermine>
did i tell you that my first command on any freshly installed alpine is apk add bash bash-completion?
<heat>
i'm intending for the standard setup on onyx would be dash providing /bin/sh and bash being installed alongside, for humanz
<nortti>
debian gnu/onyx
<heat>
it's kind of what i have on my rpms
<froggey>
porting bash was the moment I realised I was just making a linux distro and got me to move on to more interesting things
<Ermine>
btw there's something cooking with /bin/sh in alpine
<nortti>
oh are they acting on the mumblings to move away from busybox ash?
<Ermine>
aka dash-binsh, bash-binsh, etc as providers of /bin/sh
<Ermine>
but i wasn't looking too much so i may be wrong
<heat>
froggey, that's fair but writing linux is also fun :)
<Ermine>
nortti: people are generally unhappy with busybox there
<Ermine>
it's not only ash
<sortie>
froggey: Any system that succeeds well enough is doomed to become a distro :)
<heat>
my OS isn't and never was a research OS, i'm happy with just fucking about and learning things and having it work
<nortti>
Ermine: aye, just not seen talk of replacing any other parts in the base install, yet
<sortie>
You are very much right that one should think about whether wants to become a distro
<Ermine>
as always, things are slow and good alternatives are wanted
<heat>
Ermine, moving from busybox to coreutils might just be #musl 9/11
<kof673>
trillions of lines of code just vanished?
<heat>
that would be so funny, god, if you exist, please make it happen
<Ermine>
heat: it's not good for image sizes. But coreutils are there in the repos if you want them
<Ermine>
but, anyway
<osdev199>
I began implementing the syscalls one by one. I began with "open" as it is the most basic and deals with filesystem.
<osdev199>
Wrote the nvme driver, simple flat filesystem driver, and now implementing the process management.
<osdev199>
But sometimes "just" writing the syscalls become tiresome as I can't see the big picture (running dash or bash).
<osdev199>
*syscall
<heat>
Ermine, busybox is the least bad option wrt utils\{coreutils}
<heat>
toybox sucks compared to busybox
<heat>
then there are other MINIMAL utils which are even worse
<Ermine>
yes
<heat>
and the rust coreutils project seems clueless and probably BLOATED
<froggey>
sortie: it was the linux part that bothered me, extremely well travelled ground, and to me quite uninteresting. that's why I went on to make a common lisp distro instead
<Ermine>
there's a huge gap between bb and coreutils
<heat>
the linux part also bothered sortie, that's why he wrote a BSD instead
<froggey>
nah, sortix is still a linux
<Ermine>
OH
<nortti>
hm, what does chimera linux use for its utils?
<Ermine>
what a take
<heat>
nortti, bsd utils
<Ermine>
nortti: they ported bsd utils
<heat>
froggey, sortix is most definitely not a linux
<nortti>
wonder how those would compare for alpine
<froggey>
I disagree
<froggey>
bsd is also a linux
<heat>
no
<heat>
BSD is a UNIX, linux (or better, GNU+Linux, unironically) is a UNIX
<froggey>
same thing, they're all linuxes
<heat>
is GNU hurd also a linux then?
<froggey>
it's a weird linux, but largely linux compatible
<Ermine>
is windows a linux
<nortti>
qnx?
<froggey>
Ermine: no! unless you install linux for windows
<froggey>
but even then you only have a linux installed on your windows. I don't think it makes windows inherently linuxy
<Ermine>
define "linuxy"
<heat>
your definition of linux seems to be very loose
<froggey>
no
<froggey>
heat: yes
<heat>
to me BSD is quite distinct from linux
<heat>
in that BSD sucks for humans and sucks for actual prod
<heat>
hey google, why do commands not have a fucking --help you IDIOTS
<froggey>
linux ate all the other unixs and now there's linux and everything else is a rounding error
<Ermine>
is netflix prod a joke for you
<heat>
froggey, yes that is true
<osdev199>
what do you think about implementing the syscalls one by one to eventually run a shell like dash or bash?
<heat>
but linux also largely ate all the other operating systems
<heat>
would love to know the ratio of windows server installs/linux server installs
<heat>
and how many of those windows server installs are related to active directory
<Ermine>
windows fans would say that this ratio is not as small as you would except
<Ermine>
or expect
<heat>
that could be true, but we'll never know
<Ermine>
english is hard when these two words are involved
<heat>
apple doesn't run macOS for server prod btw
<bslsk05>
support.apple.com: About macOS Server 5.7.1 and later - Apple Support
Halofreak1990 has quit [Ping timeout: 245 seconds]
<froggey>
they run windows??
<heat>
they run linux
<heat>
in fact they not only run linux on their servers, they also prototype and do platform bringup for new stuff on linux, and then never upstream the code
<Ermine>
apple support asahi plox!!!
<Ermine>
nortti: oh, will know
mobivme has joined #osdev
<nortti>
okay looks like it was essentially just internal-network-user-management tool after 2018
<nortti>
which is still longer than I'd've expected, given that they'd stopped manufacturing the xserve in 2011
<heat>
hipster active directory
Left_Turn has joined #osdev
bauen1 has joined #osdev
Turn_Left has quit [Ping timeout: 265 seconds]
<pog>
hi
<nikolar>
oi
* Ermine
gives pog a piece of cheese
mobivme has quit [Remote host closed the connection]
mobivme has joined #osdev
osdev199 has quit [Ping timeout: 260 seconds]
mobivme has quit [Ping timeout: 246 seconds]
* pog
is fascinated
<sortie>
<heat> hey google, why do commands not have a fucking --help you IDIOTS
<sortie>
rtfm
<sortie>
I actually began removing --help from my utils because it was bothersome to maintain, made the binaries larger, and I already do man pages
<gog>
reading?
<gog>
READING???
<gog>
chatgpt, what is reading the manual and why is it stupid
<froggey>
if option == "--help" { system("man {argv[0]}"); }
<froggey>
I feel like that'd be a pretty good way of going about it. you want some help? have *all* the help
<gog>
i like a --usage option
<gog>
there are ways to automate something like that and make it less annoying to maintain
<gog>
just so i can quickly get the command line options or order the command expects
<heat>
i'm a big --help stan
<heat>
usually way faster than reading a full manpage
<heat>
also i'm a big long options stan, which BSD also hates
vdamewood has joined #osdev
the_oz has quit [Remote host closed the connection]
the_oz has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 272 seconds]
steelswords94361 has quit [Quit: Ping timeout (120 seconds)]
steelswords94361 has joined #osdev
mra has quit [Quit: Client closed]
<gog>
smh woke instructions
<gog>
lgdt
<gog>
pronouns in stack
<zid>
you have a whole STACK of pronouns now? fuckin greedy
<zid>
leave some for the rest of we
<zid>
me don't wanna be left with only the shitty ones
<gog>
i hate context switching code it always hurts my brain
<gog>
have to think about things backwards
<zid>
yea but there's a neo turf masters tournament atm
<zid>
so the universe isn't all bad
<gog>
who
troseman has joined #osdev
<gog>
ok so if i have a noreturn function that sets up a stack frame to go to user mode, if i save the rsp before calling the exit routine, all of the state that the compiler will spill to the stack is forgotten anyway so it doesn't matter
<gog>
right?
<gog>
and the register state at that point is irrelevant anyway
<gog>
it's actually all irrelevant before calling the function that sets up the stack frame
<gog>
so it's like a disposable frame i guess
<gog>
my brain hurts
<gog>
i should draw a diagram
<zid>
oof they're in sudden death and someone just hit the pin
<heat>
i have PRIOR ART on doing this sort of stuff
<gog>
yeah i was experimenting with this stuff prior to my hiatus because i still couldn't really wrap my head around the transition from one context to another
<heat>
actually i might be able to get rid of return_from_execve
<heat>
i dont exactly remember why i added it
<heat>
but the normal syscall return path might just work
goliath has quit [Quit: SIGSEGV]
<gog>
heat that code was riddled with errors why didn't you tell me
<gog>
you're supposed to be my friend
<heat>
well yeah obviously it had a bunch of warnings
<heat>
cant convert from char * to u64 * like that
<gog>
no i mean syntax errors, i can't write c
<heat>
C# brainrot
<zid>
to be fair most of the decs are missing
<zid>
so we can't really see them
<heat>
is the -= thing invalid there? maybe?
<zid>
and I said to remove the -sizeofs, which would fix most of them
<heat>
i've never seen that before
<gog>
public class Ohio { string Sigma { gyatt; } }
<zid>
should work?
<gog>
wdym
<gog>
also maybe it's invaloid
<heat>
can you do u64 val = (boot_image_stack_head -= sizeof(uint64_t)) is my question
<heat>
like, idk what the result of a -= expression is
<gog>
it compiled
craigo has joined #osdev
craigo has quit [Read error: Connection reset by peer]
<zid>
gog: x86 is full stack, meaning rsp points to data not to an empty slot
<zid>
or empty? fuck
<zid>
I never remember
<gog>
right, but this is a stack frame i'm populating
craigo has joined #osdev
<zid>
oh these are pushes
<gog>
yeah
<zid>
I'd just make a fake stack and use a PUSH macro :P
<gog>
i will eventually, provided any of this works
<zid>
is it xx:47 yet
<gog>
if it doesn't work i'm going to go back to webdev
<zid>
I need to pull a pizza out at that point
<gog>
9 minutes
<gog>
pizza time zid
Halofreak1990 has joined #osdev
<zid>
has!
<zid>
shit, forgotto find a yotube vod
<gog>
i forgor
<zid>
pizza is goed
<zid>
take cheap supermarket pizza, spray olive oil, sprinkle salt, handfuls of smoked dried jalapeno flakes
<zid>
oh and wet its bum so it doesn't overcook
xenos1984 has quit [Ping timeout: 272 seconds]
Arthuria has joined #osdev
<gog>
qemu sigquits when i lretq :(
xenos1984 has joined #osdev
<gog>
she lretq on my stack frame until i sigquit
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xenos1984 has quit [Ping timeout: 246 seconds]
<gog>
oh it's misaligned for one
<gog>
but also i think my assignment after -= doesn'tw ork right
FreeFull has joined #osdev
<heat>
god cries every time you misalign the stack
<gog>
yes
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 252 seconds]
xenos1984 has joined #osdev
<kof673>
> the result of a -= expression i think that is fine, akin to: a = (b = c) so the result is the left hand side surely.....it is not post- or pre-increment/decrement-like
<gog>
yeah i found my stack misalignment
<gog>
my alignof() expression is on a packed struct :|
Lucretia has quit [Remote host closed the connection]
Lucretia has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
netbsduser`` has joined #osdev
Lucretia has quit [Remote host closed the connection]
troseman has quit [Quit: troseman]
Lucretia has joined #osdev
Halofreak1990 has quit [Ping timeout: 276 seconds]
foudfou has quit [Remote host closed the connection]
Halofreak1990 has joined #osdev
foudfou has joined #osdev
Halofreak1990 has quit [Ping timeout: 248 seconds]
Lucretia has quit [Remote host closed the connection]
Lucretia has joined #osdev
LjL has left #osdev [Leaving]
Lucretia has quit [Remote host closed the connection]
goliath has joined #osdev
mra has joined #osdev
<gog>
it works yay
<gog>
at least this hafl
ski has quit [Quit: Lost terminal]
<gog>
i guess i should clean this up now
Lucretia has joined #osdev
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
cloudowind has quit [Ping timeout: 252 seconds]
cloudowind has joined #osdev
* cloudowind
wishes goodays to osdevers and joins the silence
<ring0_starr>
i am sorta feeling like a ghost in the shell themed third person shooter
<ring0_starr>
slash platformer
<ring0_starr>
but the assets would be the major limiting factor, bleh
<ring0_starr>
and then when i get bored with that it's back to osdev
<ring0_starr>
i am never going to finish a single project ever
<cloudowind>
ooo team is here:) goodays
<zid>
I was already listening to it though
<zid>
should I double it up, or restart it
<gog>
silence, or depeche mode?
<ring0_starr>
i never knew there was a video for enjoy the silence
<zid>
enjoy the silence by depeche mode
<gog>
lmao for real
<zid>
near enough, I was listening to youtube play random 80s stuff
<zid>
it likes this one and the one in the library
<gog>
random 80's stuff is a very common youtube mix i get
<gog>
the algorithm seems to think i like new wave
<gog>
(it's right)
<cloudowind>
ive written the most complicated ever service manager last night that is ; for service in /etc/rc.d/rc$1.d/S*; do [-x "$service"] && "$service" start done echo "runlevel $1 completed"
<zid>
*struggles to remember which random 80s track is set in a library*
<zid>
ah tears for fears - head over heels
<gog>
tears for fears, head over heels
<zid>
thanks
<ring0_starr>
enjoy the silence is early 90s though
<zid>
the donnie darko theme
<gog>
it has a very 80's sound tho
<gog>
to me anyway
<zid>
I miss you know, vocalists
<zid>
gated reverb drums are back in apparently?
<gog>
maybe i'll put on some talking heads
<ring0_starr>
ONCE IN A LIFEEEEEETIME
<gog>
i think the 80's revival peaked already, with after laughter by paramore
<gog>
(one of my favorite albums of the last decade)
<gog>
AND YOU MAY FIND YOURSELF
<ring0_starr>
i already found myself, just need life to stop being shitty