This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <pthread.h> | |
#include <unistd.h> | |
void *work(void *arg) { | |
printf("Sleeping for %d seconds.\n", *(int *) arg); | |
sleep(*(uint *) arg); | |
printf("%d\n", *(int*) arg); | |
return arg; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# bee - return Spelling Bee words from maximal set | |
# Andrew Ho <[email protected]> | |
ME=`basename "$0"` | |
USAGE="usage: $ME letters middle-letter" | |
die_usage() { (echo "$ME: $@"; echo "$USAGE") 1>&2; exit 1; } | |
letters="$1" | |
[[ -z "$letters" ]] && die_usage 'missing required letters' |