Truly independent web browser
Go to file
Andrew Kaster cdbbe14062 LibC: Implement Itanium C++ ABI for static variable guards
This is __cxa_guard_acquire, __cxa_guard_release, and __cxa_guard_abort.

We put these symbols in a 'fake' libstdc++ to trick gcc into thinking it
has libstdc++. These symbols are necessary for C++ programs and not C
programs, so, seems file. There's no way to tell gcc that, for example,
the standard lib it should use is libc++ or libc. So, this is what we
have for now.

When threaded code enters a block that is trying to call the constructor
for a block-scope static, the compiler will emit calls to these methods
to handle the "call_once" nature of block-scope statics.

The compiler creates a 64-bit guard variable, which it checks the first
byte of to determine if the variable should be intialized or not.

If the compiler-generated code reads that byte as a 0, it will call
__cxa_guard_acquire to try and be the thread to call the constructor for
the static variable. If the first byte is 1, it will assume that the
variable's constructor was called, and go on to access it.

__cxa_guard_acquire uses one of the 7 implementation defined bytes of
the guard variable as an atomic 8 bit variable. To control a state
machine that lets each entering thread know if they gained
'initialization rights', someone is working on the varaible, someone is
working on the varaible and there's at least one thread waiting for it
to be intialized, or if the variable was initialized and it's time to
access it. We only store a 1 to the byte the compiler looks at in
__cxa_guard_release, and use a futex to handle waiting.
2020-05-20 08:37:50 +02:00
.github Meta: Add GitHub Sponsors to funding options 2019-11-02 23:32:34 +01:00
AK AK: Don't demangle in serenity :( 2020-05-20 08:37:50 +02:00
Applications FileManager: Remove empty public access modifier from DesktopWidget 2020-05-19 19:25:41 +02:00
Base LibWeb: Allow reloading the current page with location.reload() 2020-05-18 22:05:13 +02:00
Demos Demos: Compile LibGfxDemo with the new CMake build system 2020-05-16 22:59:19 +02:00
DevTools HackStudio: Don't use an OOB TextRange when looking for hovered text 2020-05-18 20:44:31 +02:00
Documentation Meta: Update CLion and WSL configuration documentations 2020-05-17 23:07:35 +02:00
Games Build: Switch to CMake :^) 2020-05-14 20:15:18 +02:00
Kernel Kernel: Don't link against libstdc++ 2020-05-20 08:37:50 +02:00
Libraries LibC: Implement Itanium C++ ABI for static variable guards 2020-05-20 08:37:50 +02:00
MenuApplets ClipboardHistory: Add a clipboard history applet :^) 2020-05-16 09:13:25 +02:00
Meta Meta: Update CLion and WSL configuration documentations 2020-05-17 23:07:35 +02:00
Ports Ports: Make bash link again 2020-05-18 11:29:08 +02:00
Services WindowServer: Remove WindowManager::invalidate(Window) API's 2020-05-20 08:31:46 +02:00
Shell LibLine: Handle unicode correctly 2020-05-18 11:31:43 +02:00
Tests LibC: strtod accuracy tests no longer need to skip 2020-05-11 10:52:24 +02:00
Toolchain LibC: Implement Itanium C++ ABI for static variable guards 2020-05-20 08:37:50 +02:00
Userland df: Don't include c++ standard <cstring> 2020-05-20 08:37:50 +02:00
.clang-format Meta: Update .clang-format to not indent nested namespaces 2020-03-14 10:10:21 +01:00
.gitignore Build: Switch to CMake :^) 2020-05-14 20:15:18 +02:00
.travis.yml Build: Switch to CMake :^) 2020-05-14 20:15:18 +02:00
CMakeLists.txt Build: Use -Wno-expansion-to-defined 2020-05-16 22:41:09 +02:00
CODE_OF_CONDUCT.md Meta: Move code of conduct (lol) to a separate file 2019-10-23 10:05:06 +02:00
CONTRIBUTING.md Docs: Update required clang-format version to 10 in CONTRIBUTING.md 2020-05-15 12:26:23 +02:00
INSTALL.md Meta: Update link to build instructions in INSTALL.md 2020-01-01 17:33:32 +01:00
LICENSE Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
ReadMe.md Meta: Add Linus, Ali and Shannon to the "Contributors" list 2020-05-17 16:27:51 +02:00

SerenityOS

Graphical Unix-like operating system for x86 computers.

Travis CI status

About

SerenityOS is a love letter to '90s user interfaces with a custom Unix-like core. It flatters with sincerity by stealing beautiful ideas from various other systems.

Roughly speaking, the goal is a marriage between the aesthetic of late-1990s productivity software and the power-user accessibility of late-2000s *nix. This is a system by us, for us, based on the things we like.

I (Andreas) regularly post raw hacking sessions and demos on my YouTube channel.

Sometimes I write about the system on my github.io blog.

I'm also on Patreon and GitHub Sponsors if you would like to show some support that way.

Screenshot

Screenshot as of 1133aca

Kernel features

  • x86 (32-bit) kernel with pre-emptive multi-threading
  • Hardware protections (SMEP, SMAP, UMIP, NX, WP, TSD, ...)
  • IPv4 stack with ARP, TCP, UDP and ICMP protocols
  • ext2 filesystem
  • POSIX signals
  • Purgeable memory
  • /proc filesystem
  • Pseudoterminals (with /dev/pts filesystem)
  • Filesystem notifications
  • CPU and memory profiling
  • SoundBlaster 16 driver
  • VMWare/QEMU mouse integration

System services

  • Launch/session daemon (SystemServer)
  • Compositing window server (WindowServer)
  • Text console manager (TTYServer)
  • DNS client (LookupServer)
  • Network protocols server (ProtocolServer)
  • Software-mixing sound daemon (AudioServer)
  • Desktop notifications (NotificationServer)
  • HTTP server (WebServer)
  • Telnet server (TelnetServer)
  • DHCP client (DHCPClient)

Libraries

  • C++ templates and containers (AK)
  • Event loop and utilities (LibCore)
  • 2D graphics library (LibGfx)
  • GUI toolkit (LibGUI)
  • Cross-process communication library (LibIPC)
  • HTML/CSS engine (LibWeb)
  • JavaScript engine (LibJS)
  • Markdown (LibMarkdown)
  • Audio (LibAudio)
  • PCI database (LibPCIDB)
  • Terminal emulation (LibVT)
  • Out-of-process network protocol I/O (LibProtocol)
  • Mathematical functions (LibM)
  • ELF file handing (LibELF)
  • POSIX threading (LibPthread)
  • Higher-level threading (LibThread)
  • Transport Layer Security (LibTLS)
  • HTTP and HTTPS (LibHTTP)

Userland features

  • Unix-like libc and userland
  • Shell with pipes and I/O redirection
  • On-line help system (both terminal and GUI variants)
  • Web browser (Browser)
  • C++ IDE (HackStudio)
  • IRC client
  • Desktop synthesizer (Piano)
  • Various desktop apps & games
  • Color themes

How do I build and run this?

See the SerenityOS build instructions

Before opening an issue

Please see the issue policy.

Wanna chat?

Come hang out with us in #serenityos on the Freenode IRC network.

Author

Contributors

(And many more!) The people listed above have landed more than 100 commits in the project. :^)

License

SerenityOS is licensed under a 2-clause BSD license.