25 #include <propeller.h> 36 unsigned int pins = (
unsigned int)arg;
45 pthread_set_affinity_thiscog_np();
48 pthread_detach(pthread_self());
56 printf(
"toggled %x on cog %d\n", pins, __builtin_propeller_cogid());
70 int main (
int argc,
char* argv[])
75 printf(
"hello, world!\n");
77 for (i = 0; i < 30; i++) {
81 pthread_create(&thr[i], NULL, do_toggle, (
void *)pins);
83 printf(
"done launching threads!\n");