Assorted whitespace cleanup and typo fixes.

This commit is contained in:
Michael Lotz
2015-08-20 21:54:41 +02:00
parent 44b69ccbdb
commit 5d4501aa01
6 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -302,7 +302,7 @@ thread_is_blocked(Thread* thread)
especially with a client lock that uses the thread blocking API. After a especially with a client lock that uses the thread blocking API. After a
blocked thread has been interrupted or the the time out occurred it cannot blocked thread has been interrupted or the the time out occurred it cannot
acquire the client lock (or any other lock using the thread blocking API) acquire the client lock (or any other lock using the thread blocking API)
without first making sure that the thread doesn't still appears to be without first making sure that the thread doesn't still appear to be
waiting to other client code. Otherwise another thread could try to unblock waiting to other client code. Otherwise another thread could try to unblock
it which could erroneously unblock the thread while already waiting on the it which could erroneously unblock the thread while already waiting on the
client lock. So usually when interruptions or timeouts are possible a client lock. So usually when interruptions or timeouts are possible a
+1 -1
View File
@@ -453,7 +453,7 @@ struct Thread : TeamThreadIteratorEntry<thread_id>, KernelReferenceable {
// modified by the thread itself and // modified by the thread itself and
// thus freely readable by it // thus freely readable by it
void (*cancel_function)(int); void (*cancel_function)(int);
struct { struct {
uint8 parameters[SYSCALL_RESTART_PARAMETER_SIZE]; uint8 parameters[SYSCALL_RESTART_PARAMETER_SIZE];
+3 -3
View File
@@ -233,21 +233,21 @@ template<class Element, class ElementVec>
int32 int32
OpenHashTable<Element, ElementVec>::ArraySize() const OpenHashTable<Element, ElementVec>::ArraySize() const
{ {
return fArraySize; return fArraySize;
} }
template<class Element, class ElementVec> template<class Element, class ElementVec>
int32 int32
OpenHashTable<Element, ElementVec>::VectorSize() const OpenHashTable<Element, ElementVec>::VectorSize() const
{ {
return fElementVector->Size(); return fElementVector->Size();
} }
template<class Element, class ElementVec> template<class Element, class ElementVec>
int32 int32
OpenHashTable<Element, ElementVec>::CountElements() const OpenHashTable<Element, ElementVec>::CountElements() const
{ {
return fElementCount; return fElementCount;
} }
+1 -1
View File
@@ -80,7 +80,7 @@ private:
static const uint32 kFlagsCovering = 0x00000100; static const uint32 kFlagsCovering = 0x00000100;
static const uint32 kFlagsType = 0xfffff000; static const uint32 kFlagsType = 0xfffff000;
static const uint32 kBucketCount = 32; static const uint32 kBucketCount = 32;
struct LockWaiter : DoublyLinkedListLinkImpl<LockWaiter> { struct LockWaiter : DoublyLinkedListLinkImpl<LockWaiter> {
LockWaiter* next; LockWaiter* next;
+5 -5
View File
@@ -1145,8 +1145,8 @@ restart:
rw_lock_read_unlock(&sVnodeLock); rw_lock_read_unlock(&sVnodeLock);
if (!canWait || --tries < 0) { if (!canWait || --tries < 0) {
// vnode doesn't seem to become unbusy // vnode doesn't seem to become unbusy
dprintf("vnode %" B_PRIdDEV ":%" B_PRIdINO " is not becoming unbusy!\n", dprintf("vnode %" B_PRIdDEV ":%" B_PRIdINO
mountID, vnodeID); " is not becoming unbusy!\n", mountID, vnodeID);
return B_BUSY; return B_BUSY;
} }
snooze(5000); // 5 ms snooze(5000); // 5 ms
@@ -1300,7 +1300,7 @@ free_unused_vnodes(int32 level)
AutoLocker<Vnode> nodeLocker(vnode); AutoLocker<Vnode> nodeLocker(vnode);
// Check whether the node is still unused -- since we only append to the // Check whether the node is still unused -- since we only append to the
// the tail of the unused queue, the vnode should still be at its head. // tail of the unused queue, the vnode should still be at its head.
// Alternatively we could check its ref count for 0 and its busy flag, // Alternatively we could check its ref count for 0 and its busy flag,
// but if the node is no longer at the head of the queue, it means it // but if the node is no longer at the head of the queue, it means it
// has been touched in the meantime, i.e. it is no longer the least // has been touched in the meantime, i.e. it is no longer the least
@@ -2100,7 +2100,7 @@ lookup_dir_entry(struct vnode* dir, const char* name, struct vnode** _vnode)
if (status != B_OK) if (status != B_OK)
return status; return status;
// The lookup() hook call get_vnode() or publish_vnode(), so we do already // The lookup() hook calls get_vnode() or publish_vnode(), so we do already
// have a reference and just need to look the node up. // have a reference and just need to look the node up.
rw_lock_read_lock(&sVnodeLock); rw_lock_read_lock(&sVnodeLock);
*_vnode = lookup_vnode(dir->device, id); *_vnode = lookup_vnode(dir->device, id);
@@ -8890,7 +8890,7 @@ _user_open_entry_ref(dev_t device, ino_t inode, const char* userName,
if ((openMode & O_CREAT) != 0) { if ((openMode & O_CREAT) != 0) {
return file_create_entry_ref(device, inode, name, openMode, perms, return file_create_entry_ref(device, inode, name, openMode, perms,
false); false);
} }
return file_open_entry_ref(device, inode, name, openMode, false); return file_open_entry_ref(device, inode, name, openMode, false);
@@ -479,11 +479,11 @@ _rw_lock_read_unlock_threads_locked(rw_lock* lock)
if (--lock->active_readers > 0) if (--lock->active_readers > 0)
return; return;
if (lock->active_readers < 0) { if (lock->active_readers < 0) {
panic("rw_lock_read_unlock(): lock %p not read-locked", lock); panic("rw_lock_read_unlock(): lock %p not read-locked", lock);
lock->active_readers = 0; lock->active_readers = 0;
return; return;
} }
rw_lock_unblock(lock); rw_lock_unblock(lock);
} }