run clang-format

This commit is contained in:
Bassem Girgis
2018-10-17 23:47:57 -05:00
parent 558e8e22da
commit c8a8949366
56 changed files with 4153 additions and 3900 deletions

View File

@@ -4,26 +4,27 @@
* Demonstrate detection of errors from a typical POSIX 1003.1c-1995
* function, pthread_join.
*/
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <errno.h>
int main (int argc, char *argv[])
int
main(int argc, char* argv[])
{
pthread_t thread;
int status;
pthread_t thread;
int status;
/*
* Attempt to join with an uninitialized thread ID. On most
* implementations, this will return an ESRCH error code. If
* the local (and uninitialized) pthread_t happens to be a valid
* thread ID, it is almost certainly that of the initial thread,
* which is running main(). In that case, your Pthreads
* implementation may either return EDEADLK (self-deadlock),
* or it may hang. If it hangs, quit and try again.
*/
status = pthread_join (thread, NULL);
if (status != 0)
fprintf (stderr, "error %d: %s\n", status, strerror (status));
return status;
/*
* Attempt to join with an uninitialized thread ID. On most
* implementations, this will return an ESRCH error code. If
* the local (and uninitialized) pthread_t happens to be a valid
* thread ID, it is almost certainly that of the initial thread,
* which is running main(). In that case, your Pthreads
* implementation may either return EDEADLK (self-deadlock),
* or it may hang. If it hangs, quit and try again.
*/
status = pthread_join(thread, NULL);
if (status != 0)
fprintf(stderr, "error %d: %s\n", status, strerror(status));
return status;
}