white space cleanup
This commit is contained in:
@@ -38,7 +38,7 @@ typedef struct paddr_chunk_descriptor {
|
|||||||
#endif
|
#endif
|
||||||
} paddr_chunk_desc;
|
} paddr_chunk_desc;
|
||||||
|
|
||||||
static paddr_chunk_desc *paddr_desc; // will be one per physical chunk
|
static paddr_chunk_desc *paddr_desc; // will be one per physical chunk
|
||||||
static paddr_chunk_desc **virtual_pmappings; // will be one ptr per virtual chunk in iospace
|
static paddr_chunk_desc **virtual_pmappings; // will be one ptr per virtual chunk in iospace
|
||||||
static int first_free_vmapping;
|
static int first_free_vmapping;
|
||||||
static int num_virtual_chunks;
|
static int num_virtual_chunks;
|
||||||
|
|||||||
@@ -687,13 +687,13 @@ FUNCTION_END(handle_syscall)
|
|||||||
| THREAD_FLAGS_SYSCALL_RESTARTED), THREAD_flags(%edi)
|
| THREAD_FLAGS_SYSCALL_RESTARTED), THREAD_flags(%edi)
|
||||||
jz 2f
|
jz 2f
|
||||||
1:
|
1:
|
||||||
movl THREAD_flags(%edi), %eax
|
movl THREAD_flags(%edi), %eax
|
||||||
movl %eax, %edx
|
movl %eax, %edx
|
||||||
andl $~(THREAD_FLAGS_64_BIT_SYSCALL_RETURN \
|
andl $~(THREAD_FLAGS_64_BIT_SYSCALL_RETURN \
|
||||||
| THREAD_FLAGS_SYSCALL_RESTARTED), %edx
|
| THREAD_FLAGS_SYSCALL_RESTARTED), %edx
|
||||||
lock
|
lock
|
||||||
cmpxchgl %edx, THREAD_flags(%edi)
|
cmpxchgl %edx, THREAD_flags(%edi)
|
||||||
jnz 1b
|
jnz 1b
|
||||||
2:
|
2:
|
||||||
|
|
||||||
// post syscall debugging
|
// post syscall debugging
|
||||||
|
|||||||
@@ -390,7 +390,7 @@ x86_descriptors_init(kernel_args* args)
|
|||||||
table[9] = x86_fatal_exception; // Coprocessor Segment Overrun
|
table[9] = x86_fatal_exception; // Coprocessor Segment Overrun
|
||||||
table[10] = x86_fatal_exception; // Invalid TSS Exception (#TS)
|
table[10] = x86_fatal_exception; // Invalid TSS Exception (#TS)
|
||||||
table[11] = x86_fatal_exception; // Segment Not Present (#NP)
|
table[11] = x86_fatal_exception; // Segment Not Present (#NP)
|
||||||
table[12] = x86_64_stack_fault_exception; // Stack Fault Exception (#SS)
|
table[12] = x86_64_stack_fault_exception; // Stack Fault Exception (#SS)
|
||||||
table[13] = x86_64_general_protection_fault; // General Protection Exception (#GP)
|
table[13] = x86_64_general_protection_fault; // General Protection Exception (#GP)
|
||||||
table[14] = x86_page_fault_exception; // Page-Fault Exception (#PF)
|
table[14] = x86_page_fault_exception; // Page-Fault Exception (#PF)
|
||||||
table[16] = x86_unexpected_exception; // x87 FPU Floating-Point Error (#MF)
|
table[16] = x86_unexpected_exception; // x87 FPU Floating-Point Error (#MF)
|
||||||
|
|||||||
@@ -418,12 +418,12 @@ FUNCTION(x86_64_syscall_entry):
|
|||||||
testl $THREAD_FLAGS_SYSCALL_RESTARTED, THREAD_flags(%r12)
|
testl $THREAD_FLAGS_SYSCALL_RESTARTED, THREAD_flags(%r12)
|
||||||
jz 2f
|
jz 2f
|
||||||
1:
|
1:
|
||||||
movl THREAD_flags(%r12), %eax
|
movl THREAD_flags(%r12), %eax
|
||||||
movl %eax, %edx
|
movl %eax, %edx
|
||||||
andl $~THREAD_FLAGS_SYSCALL_RESTARTED, %edx
|
andl $~THREAD_FLAGS_SYSCALL_RESTARTED, %edx
|
||||||
lock
|
lock
|
||||||
cmpxchgl %edx, THREAD_flags(%r12)
|
cmpxchgl %edx, THREAD_flags(%r12)
|
||||||
jnz 1b
|
jnz 1b
|
||||||
2:
|
2:
|
||||||
testl $(THREAD_FLAGS_DEBUGGER_INSTALLED | THREAD_FLAGS_SIGNALS_PENDING \
|
testl $(THREAD_FLAGS_DEBUGGER_INSTALLED | THREAD_FLAGS_SIGNALS_PENDING \
|
||||||
| THREAD_FLAGS_DEBUG_THREAD | THREAD_FLAGS_BREAKPOINTS_DEFINED \
|
| THREAD_FLAGS_DEBUG_THREAD | THREAD_FLAGS_BREAKPOINTS_DEFINED \
|
||||||
|
|||||||
@@ -21,10 +21,10 @@
|
|||||||
#define DEFINE_MACRO(macro, value) DEFINE_COMPUTED_ASM_MACRO(macro, value)
|
#define DEFINE_MACRO(macro, value) DEFINE_COMPUTED_ASM_MACRO(macro, value)
|
||||||
|
|
||||||
#define DEFINE_OFFSET_MACRO(prefix, structure, member) \
|
#define DEFINE_OFFSET_MACRO(prefix, structure, member) \
|
||||||
DEFINE_MACRO(prefix##_##member, offsetof(struct structure, member));
|
DEFINE_MACRO(prefix##_##member, offsetof(struct structure, member));
|
||||||
|
|
||||||
#define DEFINE_SIZEOF_MACRO(prefix, structure) \
|
#define DEFINE_SIZEOF_MACRO(prefix, structure) \
|
||||||
DEFINE_MACRO(prefix##_sizeof, sizeof(struct structure));
|
DEFINE_MACRO(prefix##_sizeof, sizeof(struct structure));
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public:
|
|||||||
uint64* _droppedEvents);
|
uint64* _droppedEvents);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void EventOccurred(NotificationService& service,
|
virtual void EventOccurred(NotificationService& service,
|
||||||
const KMessage* event);
|
const KMessage* event);
|
||||||
|
|
||||||
virtual void ThreadEnqueuedInRunQueue(Thread* thread);
|
virtual void ThreadEnqueuedInRunQueue(Thread* thread);
|
||||||
|
|||||||
@@ -327,13 +327,13 @@ FileDevice::Control(void* _cookie, int32 op, void* buffer, size_t length)
|
|||||||
|
|
||||||
device_geometry geometry;
|
device_geometry geometry;
|
||||||
geometry.bytes_per_sector = kBlockSize;
|
geometry.bytes_per_sector = kBlockSize;
|
||||||
geometry.sectors_per_track = 1;
|
geometry.sectors_per_track = 1;
|
||||||
geometry.cylinder_count = blocks / heads;
|
geometry.cylinder_count = blocks / heads;
|
||||||
geometry.head_count = heads;
|
geometry.head_count = heads;
|
||||||
geometry.device_type = B_DISK;
|
geometry.device_type = B_DISK;
|
||||||
geometry.removable = false;
|
geometry.removable = false;
|
||||||
geometry.read_only = false;
|
geometry.read_only = false;
|
||||||
geometry.write_once = false;
|
geometry.write_once = false;
|
||||||
|
|
||||||
return set_ioctl_result(geometry, buffer, length);
|
return set_ioctl_result(geometry, buffer, length);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2061,8 +2061,8 @@ elf_load_user_image(const char *path, Team *team, int flags, addr_t *entry)
|
|||||||
|
|
||||||
// register the loaded image
|
// register the loaded image
|
||||||
imageInfo.basic_info.type = B_LIBRARY_IMAGE;
|
imageInfo.basic_info.type = B_LIBRARY_IMAGE;
|
||||||
imageInfo.basic_info.device = st.st_dev;
|
imageInfo.basic_info.device = st.st_dev;
|
||||||
imageInfo.basic_info.node = st.st_ino;
|
imageInfo.basic_info.node = st.st_ino;
|
||||||
strlcpy(imageInfo.basic_info.name, path, sizeof(imageInfo.basic_info.name));
|
strlcpy(imageInfo.basic_info.name, path, sizeof(imageInfo.basic_info.name));
|
||||||
|
|
||||||
imageInfo.basic_info.api_version = B_HAIKU_VERSION;
|
imageInfo.basic_info.api_version = B_HAIKU_VERSION;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#define DEFINE_SIZE_MACRO(name) \
|
#define DEFINE_SIZE_MACRO(name) \
|
||||||
DEFINE_COMPUTED_ASM_MACRO(_KERNEL_CPP_STRUCT_SIZE_##name, sizeof(name));
|
DEFINE_COMPUTED_ASM_MACRO(_KERNEL_CPP_STRUCT_SIZE_##name, sizeof(name));
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -1102,7 +1102,7 @@ _user_xsi_semop(int semaphoreID, struct sembuf *ops, size_t numOps)
|
|||||||
TRACE_ERROR(("xsi_semop: failed to allocate sembuf struct\n"));
|
TRACE_ERROR(("xsi_semop: failed to allocate sembuf struct\n"));
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
}
|
}
|
||||||
MemoryDeleter operationsDeleter(operations);
|
MemoryDeleter operationsDeleter(operations);
|
||||||
|
|
||||||
if (user_memcpy(operations, ops,
|
if (user_memcpy(operations, ops,
|
||||||
(sizeof(struct sembuf) * numOps)) < B_OK) {
|
(sizeof(struct sembuf) * numOps)) < B_OK) {
|
||||||
@@ -1172,7 +1172,7 @@ _user_xsi_semop(int semaphoreID, struct sembuf *ops, size_t numOps)
|
|||||||
if (operation != 0)
|
if (operation != 0)
|
||||||
semaphore->Revert(operation);
|
semaphore->Revert(operation);
|
||||||
}
|
}
|
||||||
if (result != 0)
|
if (result != 0)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
// We have to wait: first enqueue the thread
|
// We have to wait: first enqueue the thread
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* Hugo Santos, hugosantos@gmail.com
|
* Hugo Santos, hugosantos@gmail.com
|
||||||
*/
|
*/
|
||||||
#ifndef SLAB_PRIVATE_H
|
#ifndef SLAB_PRIVATE_H
|
||||||
#define SLAB_PRIVATE_H
|
#define SLAB_PRIVATE_H
|
||||||
|
|||||||
@@ -2308,7 +2308,7 @@ get_job_control_entry(team_job_control_children& children, pid_t id)
|
|||||||
|
|
||||||
|
|
||||||
/*! Returns the first job control entry from one of team's dead, continued, or
|
/*! Returns the first job control entry from one of team's dead, continued, or
|
||||||
stopped children which matches \a id.
|
stopped children which matches \a id.
|
||||||
\a id can be:
|
\a id can be:
|
||||||
- \code > 0 \endcode: Matching an entry with that team ID.
|
- \code > 0 \endcode: Matching an entry with that team ID.
|
||||||
- \code == -1 \endcode: Matching any entry.
|
- \code == -1 \endcode: Matching any entry.
|
||||||
|
|||||||
@@ -34,17 +34,17 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
struct VMUserAreaGetLink {
|
struct VMUserAreaGetLink {
|
||||||
inline DoublyLinkedListLink<VMUserArea>* operator()(
|
inline DoublyLinkedListLink<VMUserArea>* operator()(
|
||||||
VMUserArea* area) const
|
VMUserArea* area) const
|
||||||
{
|
{
|
||||||
return &area->AddressSpaceLink();
|
return &area->AddressSpaceLink();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline const DoublyLinkedListLink<VMUserArea>* operator()(
|
inline const DoublyLinkedListLink<VMUserArea>* operator()(
|
||||||
const VMUserArea* area) const
|
const VMUserArea* area) const
|
||||||
{
|
{
|
||||||
return &area->AddressSpaceLink();
|
return &area->AddressSpaceLink();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef DoublyLinkedList<VMUserArea, VMUserAreaGetLink> VMUserAreaList;
|
typedef DoublyLinkedList<VMUserArea, VMUserAreaGetLink> VMUserAreaList;
|
||||||
|
|||||||
@@ -14,32 +14,32 @@ static uint64_t cv_factor_nsec;
|
|||||||
extern "C" void
|
extern "C" void
|
||||||
__x86_setup_system_time(uint64_t cv, uint64_t cv_nsec)
|
__x86_setup_system_time(uint64_t cv, uint64_t cv_nsec)
|
||||||
{
|
{
|
||||||
cv_factor = cv;
|
cv_factor = cv;
|
||||||
cv_factor_nsec = cv_nsec;
|
cv_factor_nsec = cv_nsec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline uint64_t
|
static inline uint64_t
|
||||||
rdtsc()
|
rdtsc()
|
||||||
{
|
{
|
||||||
uint64_t lo, hi;
|
uint64_t lo, hi;
|
||||||
__asm__("rdtsc" : "=a" (lo), "=d" (hi));
|
__asm__("rdtsc" : "=a" (lo), "=d" (hi));
|
||||||
return lo | (hi << 32);
|
return lo | (hi << 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern "C" [[gnu::optimize("omit-frame-pointer")]] int64_t
|
extern "C" [[gnu::optimize("omit-frame-pointer")]] int64_t
|
||||||
system_time()
|
system_time()
|
||||||
{
|
{
|
||||||
__uint128_t time = static_cast<__uint128_t>(rdtsc()) * cv_factor;
|
__uint128_t time = static_cast<__uint128_t>(rdtsc()) * cv_factor;
|
||||||
return time >> 64;
|
return time >> 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern "C" [[gnu::optimize("omit-frame-pointer")]] int64_t
|
extern "C" [[gnu::optimize("omit-frame-pointer")]] int64_t
|
||||||
system_time_nsecs()
|
system_time_nsecs()
|
||||||
{
|
{
|
||||||
__uint128_t t = static_cast<__uint128_t>(rdtsc()) * cv_factor_nsec;
|
__uint128_t t = static_cast<__uint128_t>(rdtsc()) * cv_factor_nsec;
|
||||||
return t >> 32;
|
return t >> 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -518,7 +518,7 @@ DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION("__find_directory_alpha4",
|
|||||||
"find_directory@", "BASE");
|
"find_directory@", "BASE");
|
||||||
|
|
||||||
DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION("__find_directory", "find_directory@@",
|
DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION("__find_directory", "find_directory@@",
|
||||||
"1_ALPHA5");
|
"1_ALPHA5");
|
||||||
#else // _LOADER_MODE
|
#else // _LOADER_MODE
|
||||||
status_t
|
status_t
|
||||||
__find_directory(directory_which which, dev_t device, bool createIt,
|
__find_directory(directory_which which, dev_t device, bool createIt,
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ static const known_identifier kIdentifiers[] = {
|
|||||||
{"GMT", NULL, TYPE_TIME_ZONE, FLAG_NONE, UNIT_SECOND, 0},
|
{"GMT", NULL, TYPE_TIME_ZONE, FLAG_NONE, UNIT_SECOND, 0},
|
||||||
{"UTC", NULL, TYPE_TIME_ZONE, FLAG_NONE, UNIT_SECOND, 0},
|
{"UTC", NULL, TYPE_TIME_ZONE, FLAG_NONE, UNIT_SECOND, 0},
|
||||||
// the following list has been generated from info found at
|
// the following list has been generated from info found at
|
||||||
// http://www.timegenie.com/timezones
|
// http://www.timegenie.com/timezones
|
||||||
{"ACDT", NULL, TYPE_TIME_ZONE, FLAG_NONE, UNIT_SECOND, 1050 * 36},
|
{"ACDT", NULL, TYPE_TIME_ZONE, FLAG_NONE, UNIT_SECOND, 1050 * 36},
|
||||||
{"ACIT", NULL, TYPE_TIME_ZONE, FLAG_NONE, UNIT_SECOND, 800 * 36},
|
{"ACIT", NULL, TYPE_TIME_ZONE, FLAG_NONE, UNIT_SECOND, 800 * 36},
|
||||||
{"ACST", NULL, TYPE_TIME_ZONE, FLAG_NONE, UNIT_SECOND, 950 * 36},
|
{"ACST", NULL, TYPE_TIME_ZONE, FLAG_NONE, UNIT_SECOND, 950 * 36},
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* Jérôme Duval, korli@users.sourceforge.net.
|
* Jérôme Duval, jerome.duval@gmail.com
|
||||||
* Michael Pfeiffer, laplace@users.sourceforge.net
|
* Michael Pfeiffer, laplace@users.sourceforge.net
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user