Here are some values and prototypes that may be handy to have on hand as you take the final exam:
-
Sizes
-
8: 23, 16: 24, 32: 25, 64: 26, 128: 27, 256: 28, 512: 29
-
1KB: 210
-
1MB: 220
-
1GB: 230
-
-
Times
-
1 ms (milisecond) is 10-3 seconds
-
1 mus (microsecond) is 10-6 seconds
-
1 ns (nanosecond) is 10-9 seconds
-
-
Function Prototypes
int strlen(char *s);
int strcmp(char *s1, char *s2);
char *strcpy(char *dest, char *src);
char *strstr(char *haystack, char *needle);
int isalnum(char c);
int isalpha(char c);
int isspace(char c);
pid_t fork();
int execvp(char *file_name, char *argv[]);
pid_t wait(int *status);
pid_t waitpid(pid_t pid, int *status, int options);
int signal(int signum, void (*sighandler)(int));
int pthread_create(pthread_t *thread, pthread_attr_t *attr,
void *(*start_routine) (void *), void *arg);
int pthread_join(pthread_t thread, void **retval);
pthread_mutex_t mux = PTHREAD_MUTEX_INITIALIZER;
int pthread_mutex_lock(pthread_mutex_t *mutex);
int pthread_mutex_unlock(pthread_mutex_t *mutex);
int pthread_barrier_init(pthread_barrier_t *barrier,
pthread_barrierattr_t *attr, unsigned count);
int pthread_barrier_wait(pthread_barrier_t *barrier);
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
int pthread_cond_signal(pthread_cond_t *cond);
-
Exam Info