1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-27 21:01:50 +03:00

clang format apply

This commit is contained in:
Leonid Fedorov
2022-01-21 16:43:49 +00:00
parent 6b6411229f
commit 04752ec546
1376 changed files with 393460 additions and 412662 deletions

View File

@ -32,37 +32,37 @@ char* name;
void usage()
{
cout << "Usage " << name << " which_lock_to_use which_side_to_use lock_or_unlock\n" <<
" which_lock_to_use: 1=VSS 2=ExtentMap 3=FreeList 4=VBBM 5=CopyLocks\n";
exit(1);
cout << "Usage " << name << " which_lock_to_use which_side_to_use lock_or_unlock\n"
<< " which_lock_to_use: 1=VSS 2=ExtentMap 3=FreeList 4=VBBM 5=CopyLocks\n";
exit(1);
}
int main(int argc, char** argv)
{
uint32_t which_lock; // 1-5
RWLock* rwlock;
LockState state;
uint32_t which_lock; // 1-5
RWLock* rwlock;
LockState state;
name = argv[0];
name = argv[0];
if (argc != 2)
usage();
if (argc != 2)
usage();
if (strlen(argv[1]) != 1)
usage();
if (strlen(argv[1]) != 1)
usage();
which_lock = atoi(argv[1]);
which_lock = atoi(argv[1]);
if (which_lock < 1 || which_lock > 5)
usage();
if (which_lock < 1 || which_lock > 5)
usage();
rwlock = new RWLock(0x10000 * which_lock);
state = rwlock->getLockState();
cout << "readers = " << state.reading << endl
<< "writers = " << state.writing << endl
<< "readers waiting = " << state.readerswaiting << endl
<< "writers waiting = " << state.writerswaiting << endl
<< "mutex locked = " << (int) state.mutexLocked << endl;
rwlock = new RWLock(0x10000 * which_lock);
state = rwlock->getLockState();
cout << "readers = " << state.reading << endl
<< "writers = " << state.writing << endl
<< "readers waiting = " << state.readerswaiting << endl
<< "writers waiting = " << state.writerswaiting << endl
<< "mutex locked = " << (int)state.mutexLocked << endl;
return 0;
return 0;
}