Skip to content

Instantly share code, notes, and snippets.

View olekscode's full-sized avatar
🇺🇦
Stand with Ukraine

Oleksandr Zaitsev olekscode

🇺🇦
Stand with Ukraine
View GitHub Profile
@mattonem
mattonem / smalltalkEnv.tex
Last active May 28, 2021 16:24
Smalltalk listing environment
% Just add \input{smalltalkEnv} to your file
% then you can use :
% \begin{lstlisting}[language=Smalltalk]
% false become: true.
% \end{lstlisting}
\usepackage{color}
\usepackage{listings}
\usepackage{etoolbox}
#include <pthread.h>
#include <stdio.h>
/* this function is run by the second thread */
void *inc_x(void *x_void_ptr)
{
/* increment x to 100 */
int *x_ptr = (int *)x_void_ptr;
while(++(*x_ptr) < 100);