Skip to content

day-02: Code Example: remove unnecessary includes #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
6 changes: 1 addition & 5 deletions src/day-02-process-states-and-transitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ Process states represent the dynamic lifecycle of computational execution. Under

```c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>

// Process state enumeration
typedef enum {
Expand Down Expand Up @@ -156,16 +154,14 @@ int main() {
### For Linux/Unix Systems:
```bash
# Compile the program
gcc -o process_states process_states.c -pthread
gcc -o process_states process_states.c

# Run the executable
./process_states
```

### Compilation Flags Explanation
- `-o process_states`: Specify output executable name
- `-pthread`: Link with POSIX threads library
- Ensures proper compilation with thread support

## 8. References and Further Reading

Expand Down