Skip to content

Instantly share code, notes, and snippets.

View anderspitman's full-sized avatar

Anders Pitman anderspitman

View GitHub Profile
Printing data for range: 1992-1992
Nodes: 755
Edges: 152
Average degree: 0.201325
Degree Distribution:
0 650
1 74
2 20
typedef struct Mutex {
int locked;
} Mutex;
typedef struct Semaphore {
int count;
Mutex mutex;
} Semaphore;
#include <stdio.h>
typedef struct Semaphore {
} Semaphore;
void semaphore_init(Semaphore *sem, int value);
void semaphore_wait(Semaphore *sem);
void semaphore_signal(Semaphore *sem);
@anderspitman
anderspitman / go-env-with-msys2.md
Created February 22, 2024 02:48 — forked from glycerine/go-env-with-msys2.md
Go development environment on Windows with MSYS2

Go development environment on Windows with MSYS2

Normally, it is sufficient to grab the Go MSI installer from the website in order to set up the toolchain. However, some packages that provide Go wrappers for C libraries rely on cgo tool, which in turn, needs the GCC toolchain in order to build the glue code. Also, 3rd-party dependencies are usually hosted on services like GitHub, thus Git is also needed. This mini-guide illustrates how to setup a convenient development environment on Windows using MSYS2.