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 <stdlib.h> | |
#include <stdatomic.h> | |
#define __USE_GNU | |
#include <sched.h> | |
#include <pthread.h> | |
typedef struct { | |
char name[16]; | |
int sleepTime; | |
} Node; |
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 <stdio.h> | |
#include <stdatomic.h> | |
#include <pthread.h> | |
typedef struct { | |
char name[16]; | |
int sleepTime; | |
} Node; | |
void _usleep(int); |
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 <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#define NDATA 100000 | |
void swap(uint32_t* ); | |
uint32_t** sepaTwo(uint32_t*, uint32_t); | |
uint32_t* mergeTwo(uint32_t*, uint32_t, uint32_t*, uint32_t); | |
uint32_t* mergeSort(uint32_t*, uint32_t); |
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 <stdio.h> | |
Struct X {int a; char b; int c;}; | |
int main(void) { | |
printf("%zd\n", sizeof(int)); | |
printf("%zd\n", sizeof(char)); | |
printf("%zd\n", sizeof(struct X)); | |
} |
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 <stdio.h> | |
void foo(void) | |
{ | |
int a; | |
printf("%d\n", a); | |
} | |
void bar(void) | |
{ |
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 <stdio.h> | |
void foo(void) | |
{ | |
int a; | |
++a; | |
printf("%d\n", a); | |
} | |
int main(void) |
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
int main() | |
{ | |
int a = 42; | |
printf("%d\n", a); | |
} |
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 <stdio.h> | |
#include <string.h> | |
#include <pthread.h> | |
#include <time.h> | |
#include <unistd.h> | |
#include <sys/mman.h> | |
#define NLOOP 30 | |
int global_thread = 0; | |
pthread_mutex_t mutex; |
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
// Definitions for MPU6050 | |
/dts-v1/; | |
/plugin/; | |
/ { | |
compatible = "brcm,bcm2708"; | |
fragment@0 { | |
target = <&i2c1>; | |
__overlay__ { |
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
/dts-v1/; | |
/plugin/; | |
/ { | |
compatible = "brcm,bcm2835", "brcm,bcm2708"; | |
/* disable spi-dev for spi0.0 */ | |
fragment@0 { | |
target = <&spi0>; | |
__overlay__ { | |
status = "okay"; |
NewerOlder