Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
G17_bykes_prog_concurrente
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
remi.greub
G17_bykes_prog_concurrente
Commits
27edef78
Commit
27edef78
authored
1 month ago
by
remi.greub
Browse files
Options
Downloads
Patches
Plain Diff
petite traduction de plus
parent
e63ef07b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
G17_bykes/main.c
+4
-4
4 additions, 4 deletions
G17_bykes/main.c
with
4 additions
and
4 deletions
G17_bykes/main.c
+
4
−
4
View file @
27edef78
...
...
@@ -13,7 +13,7 @@
#define DEPOT 0
#define USLEEP
0
#define USLEEP
1
sem_t
*
sem_FreeSlot
;
sem_t
*
sem_BikeFree
;
...
...
@@ -40,7 +40,7 @@ struct Truck{
int
nbCivilians
;
};
struct
cit
ies
{
struct
cit
y
{
int
nb_bikesParked
;
int
nb_P_waiting
;
};
...
...
@@ -50,7 +50,7 @@ int rand_D();
//void civilians_PassiveMode(void *arg);
void
*
trucks
(
void
*
arg
);
void
*
civilians
(
void
*
arg
);
struct
cit
ies
*
cities
;
//this table is the size of the number of cities, each cities has NParkinglot and each numbers represents a free parkinglot
struct
cit
y
*
cities
;
//this table is the size of the number of cities, each cities has NParkinglot and each numbers represents a free parkinglot
int
main
(
int
argc
,
char
**
argv
){
...
...
@@ -68,7 +68,7 @@ int main(int argc, char **argv){
pthread_t
*
threadCivilians
=
malloc
(
sizeof
(
pthread_t
)
*
nbCivilians
);
pthread_t
*
threadTruck
=
malloc
(
sizeof
(
pthread_t
));
cities
=
calloc
(
nbcities
,
sizeof
(
struct
cit
ies
));
cities
=
calloc
(
nbcities
,
sizeof
(
struct
cit
y
));
struct
civilian
*
Civilians
=
calloc
(
nbCivilians
,
sizeof
(
struct
civilian
));
struct
Truck
*
truck
=
malloc
(
sizeof
(
struct
Truck
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment