mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:07:44 +00:00
Everywhere: Fix more typos
This commit is contained in:
parent
4e86c34ef0
commit
bcfc6f0c57
57 changed files with 108 additions and 108 deletions
|
@ -330,7 +330,7 @@ struct SC_setkeymap_params {
|
|||
struct SC_create_thread_params {
|
||||
unsigned int m_detach_state = 0; // JOINABLE or DETACHED
|
||||
int m_schedule_priority = 30; // THREAD_PRIORITY_NORMAL
|
||||
// FIXME: Implment guard pages in create_thread (unreadable pages at "overflow" end of stack)
|
||||
// FIXME: Implement guard pages in create_thread (unreadable pages at "overflow" end of stack)
|
||||
// "If an implementation rounds up the value of guardsize to a multiple of {PAGESIZE},
|
||||
// a call to pthread_attr_getguardsize() specifying attr shall store in the guardsize
|
||||
// parameter the guard size specified by the previous pthread_attr_setguardsize() function call"
|
||||
|
|
|
@ -1590,7 +1590,7 @@ void Processor::initialize_context_switching(Thread& initial_thread)
|
|||
m_scheduler_initialized = true;
|
||||
|
||||
asm volatile(
|
||||
"movl %[new_esp], %%esp \n" // swich to new stack
|
||||
"movl %[new_esp], %%esp \n" // switch to new stack
|
||||
"pushl %[from_to_thread] \n" // to_thread
|
||||
"pushl %[from_to_thread] \n" // from_thread
|
||||
"pushl $" __STRINGIFY(GDT_SELECTOR_CODE0) " \n"
|
||||
|
|
|
@ -192,7 +192,7 @@ RefPtr<DiskPartition> EBRPartitionTable::partition(unsigned index)
|
|||
|
||||
auto& header = this->header();
|
||||
if (header.mbr_signature != MBR_SIGNATURE) {
|
||||
klog() << "EBRPartitionTable::initialize: bad MBR signature - not initalized? 0x" << String::format("%x", header.mbr_signature);
|
||||
klog() << "EBRPartitionTable::initialize: bad MBR signature - not initialized? 0x" << String::format("%x", header.mbr_signature);
|
||||
return nullptr;
|
||||
}
|
||||
if (index_is_extended_partition(index))
|
||||
|
|
|
@ -76,7 +76,7 @@ RefPtr<DiskPartition> GPTPartitionTable::partition(unsigned index)
|
|||
unsigned lba = header.partition_array_start_lba + (((index - 1) * header.partition_entry_size) / BytesPerSector);
|
||||
|
||||
if (header.sig[0] != GPT_SIGNATURE) {
|
||||
klog() << "GPTPartitionTable::initialize: bad gpt signature - not initalized? 0x" << String::format("%x", header.sig);
|
||||
klog() << "GPTPartitionTable::initialize: bad gpt signature - not initialized? 0x" << String::format("%x", header.sig);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ RefPtr<DiskPartition> MBRPartitionTable::partition(unsigned index)
|
|||
auto& entry = header.entry[index - 1];
|
||||
|
||||
if (header.mbr_signature != MBR_SIGNATURE) {
|
||||
klog() << "MBRPartitionTable::initialize: bad mbr signature - not initalized? 0x" << String::format("%x", header.mbr_signature);
|
||||
klog() << "MBRPartitionTable::initialize: bad mbr signature - not initialized? 0x" << String::format("%x", header.mbr_signature);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ ssize_t TmpFSInode::write_bytes(off_t offset, ssize_t size, const UserOrKernelBu
|
|||
if (m_content.has_value() && m_content.value().capacity() >= (size_t)new_size) {
|
||||
m_content.value().set_size(new_size);
|
||||
} else {
|
||||
// Grow the content buffer 2x the new sizeto accomodate repeating write() calls.
|
||||
// Grow the content buffer 2x the new sizeto accommodate repeating write() calls.
|
||||
// Note that we're not actually committing physical memory to the buffer
|
||||
// until it's needed. We only grow VM here.
|
||||
|
||||
|
|
|
@ -359,7 +359,7 @@ void RTL8139NetworkAdapter::receive()
|
|||
|
||||
// we never have to worry about the packet wrapping around the buffer,
|
||||
// since we set RXCFG_WRAP_INHIBIT, which allows the rtl8139 to write data
|
||||
// past the end of the alloted space.
|
||||
// past the end of the allotted space.
|
||||
memcpy(m_packet_buffer->vaddr().as_ptr(), (const u8*)(start_of_packet + 4), length - 4);
|
||||
// let the card know that we've read this data
|
||||
m_rx_buffer_offset = ((m_rx_buffer_offset + length + 4 + 3) & ~3) % RX_BUFFER_SIZE;
|
||||
|
|
|
@ -397,7 +397,7 @@ void signal_trampoline_dummy(void)
|
|||
// then calls the signal handler. We do this because, when interrupting a
|
||||
// blocking syscall, that syscall may return some special error code in eax;
|
||||
// This error code would likely be overwritten by the signal handler, so it's
|
||||
// neccessary to preserve it here.
|
||||
// necessary to preserve it here.
|
||||
asm(
|
||||
".intel_syntax noprefix\n"
|
||||
"asm_signal_trampoline:\n"
|
||||
|
|
|
@ -699,7 +699,7 @@ void Scheduler::enter_current(Thread& prev_thread)
|
|||
|
||||
void Scheduler::leave_on_first_switch(u32 flags)
|
||||
{
|
||||
// This is called when a thread is swiched into for the first time.
|
||||
// This is called when a thread is switched into for the first time.
|
||||
// At this point, enter_current has already be called, but because
|
||||
// Scheduler::context_switch is not in the call stack we need to
|
||||
// clean up and release locks manually here
|
||||
|
|
|
@ -104,8 +104,8 @@ int Process::do_exec(NonnullRefPtr<FileDescription> main_program_description, Ve
|
|||
InodeMetadata loader_metadata;
|
||||
|
||||
// FIXME: Hoooo boy this is a hack if I ever saw one.
|
||||
// This is the 'random' offset we're giving to our ET_DYN exectuables to start as.
|
||||
// It also happens to be the static Virtual Addresss offset every static exectuable gets :)
|
||||
// This is the 'random' offset we're giving to our ET_DYN executables to start as.
|
||||
// It also happens to be the static Virtual Address offset every static executable gets :)
|
||||
// Without this, some assumptions by the ELF loading hooks below are severely broken.
|
||||
// 0x08000000 is a verified random number chosen by random dice roll https://xkcd.com/221/
|
||||
m_load_offset = interpreter_description ? 0x08000000 : 0;
|
||||
|
@ -113,7 +113,7 @@ int Process::do_exec(NonnullRefPtr<FileDescription> main_program_description, Ve
|
|||
// FIXME: We should be able to load both the PT_INTERP interpreter and the main program... once the RTLD is smart enough
|
||||
if (interpreter_description) {
|
||||
loader_metadata = interpreter_description->metadata();
|
||||
// we don't need the interpreter file desciption after we've loaded (or not) it into memory
|
||||
// we don't need the interpreter file description after we've loaded (or not) it into memory
|
||||
interpreter_description = nullptr;
|
||||
} else {
|
||||
loader_metadata = main_program_description->metadata();
|
||||
|
@ -176,10 +176,10 @@ int Process::do_exec(NonnullRefPtr<FileDescription> main_program_description, Ve
|
|||
|
||||
// FIXME: Move TLS region allocation to userspace: LibC and the dynamic loader.
|
||||
// LibC if we end up with a statically linked executable, and the
|
||||
// dynamic loader so that it can create new TLS blocks for each shared libarary
|
||||
// dynamic loader so that it can create new TLS blocks for each shared library
|
||||
// that gets loaded as part of DT_NEEDED processing, and via dlopen()
|
||||
// If that doesn't happen quickly, at least pass the location of the TLS region
|
||||
// some ELF Auxilliary Vector so the loader can use it/create new ones as necessary.
|
||||
// some ELF Auxiliary Vector so the loader can use it/create new ones as necessary.
|
||||
loader->tls_section_hook = [&](size_t size, size_t alignment) {
|
||||
ASSERT(size);
|
||||
master_tls_region = allocate_region({}, size, String(), PROT_READ | PROT_WRITE);
|
||||
|
@ -195,7 +195,7 @@ int Process::do_exec(NonnullRefPtr<FileDescription> main_program_description, Ve
|
|||
}
|
||||
// FIXME: Validate that this virtual address is within executable region,
|
||||
// instead of just non-null. You could totally have a DSO with entry point of
|
||||
// the beginning of the text segement.
|
||||
// the beginning of the text segment.
|
||||
if (!loader->entry().offset(m_load_offset).get()) {
|
||||
klog() << "do_exec: Failure loading " << path.characters() << ", entry pointer is invalid! (" << loader->entry().offset(m_load_offset) << ")";
|
||||
return -ENOEXEC;
|
||||
|
|
|
@ -55,7 +55,7 @@ void TTY::set_default_termios()
|
|||
KResultOr<size_t> TTY::read(FileDescription&, size_t, UserOrKernelBuffer& buffer, size_t size)
|
||||
{
|
||||
if (Process::current()->pgid() != pgid()) {
|
||||
// FIXME: Should we propigate this error path somehow?
|
||||
// FIXME: Should we propagate this error path somehow?
|
||||
(void)Process::current()->send_signal(SIGTTIN, nullptr);
|
||||
return KResult(-EINTR);
|
||||
}
|
||||
|
@ -203,8 +203,8 @@ void TTY::emit(u8 ch)
|
|||
|
||||
bool TTY::can_do_backspace() const
|
||||
{
|
||||
//can't do back space if we're empty. Plus, we don't want to
|
||||
//removing any lines "commited" by newlines or ^D.
|
||||
// can't do back space if we're empty. Plus, we don't want to
|
||||
// remove any lines "committed" by newlines or ^D.
|
||||
if (!m_input_buffer.is_empty() && !is_eol(m_input_buffer.last()) && m_input_buffer.last() != '\0') {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -231,7 +231,7 @@ void Thread::relock_process(bool did_unlock)
|
|||
process().big_lock().lock();
|
||||
}
|
||||
|
||||
// NOTE: We may be on a differenct CPU now!
|
||||
// NOTE: We may be on a different CPU now!
|
||||
Processor::current().restore_critical(prev_crit, prev_flags);
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ void RealTimeClock::reset_to_default_ticks_per_second()
|
|||
ASSERT(success);
|
||||
}
|
||||
|
||||
// FIXME: This is a quick & dirty log base 2 with a paramater. Please provide something better in the future.
|
||||
// FIXME: This is a quick & dirty log base 2 with a parameter. Please provide something better in the future.
|
||||
static int quick_log2(size_t number)
|
||||
{
|
||||
int count = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue