This file contains hidden or 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 <stdlib.h> | |
#include <stdint.h> | |
#include <stdbool.h> | |
#define HASH_BITS 10 | |
#define BUCKETS (1 << HASH_BITS) | |
/* A half-avalanche 4 byte integer hash function, as described at: | |
http://burtleburtle.net/bob/hash/integer.html */ |
This file contains hidden or 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 <string.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <X11/Xlib.h> | |
/* The window which contains the text. */ | |
struct | |
{ | |
int width; |
This file contains hidden or 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
/* Compiling with `gcc -fopenmp -m32 -O2 -S' produces: | |
movl $1, %eax | |
lock xaddl %eax, j | |
movl %eax, i | |
ret | |
*/ | |
int i, j; | |
void foo (void) |
This file contains hidden or 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 <stdlib.h> | |
#include <time.h> | |
/* http://stackoverflow.com/q/12790337/274261 */ | |
/* Generates random DAGs. The key is to 'rank' the nodes, and | |
only draw edges from lower ranked nodes to higher ranked ones. */ | |
/* Nodes/Rank: How 'fat' the DAG should be. */ |
This file contains hidden or 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> | |
unsigned int stack_size; | |
struct huge_argument /* Not the verbal kind ;). */ | |
{ | |
char x[512]; | |
}; |
This file contains hidden or 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
/* | |
gcc -O0 -std=c99 -pedantic -Wall -Werror -lpthread \ | |
-o hello-pthread hello-pthread.c | |
*/ | |
/* Enable 2008 edition functionality of POSIX.1, | |
required for pthread_rwlock_* functions. */ | |
#define _POSIX_C_SOURCE 200809L | |
#include <stdio.h> |
This file contains hidden or 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/bash | |
# TODO: Parse and report testsuite failures; | |
# fetch and execute gnulib testsuite. | |
GT_NAME=glibc-tester | |
GT_DIR=$HOME/.$GT_NAME | |
GT_CONFIG=$GT_DIR/config | |
if [ ! -d $GT_DIR ]; then |
This file contains hidden or 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 <assert.h> | |
#include <unistd.h> | |
const char *data = "zzzzzzzzzz"; | |
const char *more_data = "aaaaaaaaaa"; | |
#define TEST_FILE_PATH "tst-rewind-ftell.out" |
This file contains hidden or 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/bash | |
SRC_DIR=~/src/glibc/ | |
pushd $SRC_DIR &> /dev/null \ | |
|| { echo Unable to enter directory $SRC_DIR 1>&2; exit 1; } | |
let blkl=0 | |
let good=0 | |
let main=0 |
This file contains hidden or 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
/* | |
$ gcc -Wall -pedantic -o test-stack-switching test-stack-switching.c | |
$ valgrind ./test-stack-switching | |
Expected program output: | |
> 55 | |
> 55 | |
> 55 | |
Expected valgrind output: Three warnings that look like; |
OlderNewer