Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 02/concurrency/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ all: threads threads-notv

CFLAGS=-fcf-protection=none -fno-asynchronous-unwind-tables -m32 -fno-pie -no-pie

threads: threads.c common.h common_threads.h
threads: threads.c common_threads.h
gcc $(CFLAGS) -m32 -O1 -S threads.c
gcc $(CFLAGS) -m32 -o threads threads.s -Wall -pthread

threads-notv: threads-notv.c common.h common_threads.h
threads-notv: threads-notv.c common_threads.h
gcc $(CFLAGS) -m32 -O1 -S threads-notv.c
gcc $(CFLAGS) -m32 -o threads-notv threads-notv.s -Wall -pthread

Expand Down
22 changes: 0 additions & 22 deletions 02/concurrency/common.h

This file was deleted.

3 changes: 1 addition & 2 deletions 02/concurrency/threads-notv.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <stdio.h>
#include <stdlib.h>
#include "common.h"
#include "common_threads.h"

int counter = 0;
Expand All @@ -16,7 +15,7 @@ void *worker(void *arg) {

int main(int argc, char *argv[]) {
if (argc != 2) {
fprintf(stderr, "usage: threads <loops>\n");
fprintf(stderr, "usage: threads-notv <loops>\n");
exit(1);
}
loops = atoi(argv[1]);
Expand Down
1 change: 0 additions & 1 deletion 02/concurrency/threads.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <stdio.h>
#include <stdlib.h>
#include "common.h"
#include "common_threads.h"

volatile int counter = 0;
Expand Down
Loading