SlideShare a Scribd company logo
1 of 1
Download to read offline
in xv6 system
i have a program in c that shows process state, but after i change Makefile, it not working, what i
missed?
this is the code called pstate.c
#include "types.h"
#include "stat.h"
#include "user.h"
int main(void) {
struct proc *p;
for (p = ptable.proc; p < &ptable.proc[NPROC]; p++) {
if (p->state == UNUSED) {
continue;
}
printf("%d %sn", p->pid, states[p->state]);
}
exit();
}
this is the error

More Related Content

More from aartechindia

Incorporate the SOR method in the multigridTest-m and apply the multig.pdf
Incorporate the SOR method in the multigridTest-m and apply the multig.pdfIncorporate the SOR method in the multigridTest-m and apply the multig.pdf
Incorporate the SOR method in the multigridTest-m and apply the multig.pdf
aartechindia
 

More from aartechindia (20)

Indicate the amount of revenue that Beanville should recognize in its (1).pdf
Indicate the amount of revenue that Beanville should recognize in its (1).pdfIndicate the amount of revenue that Beanville should recognize in its (1).pdf
Indicate the amount of revenue that Beanville should recognize in its (1).pdf
 
India's major change in development strategy occurred in 1991 because.pdf
India's major change in development strategy occurred in 1991 because.pdfIndia's major change in development strategy occurred in 1991 because.pdf
India's major change in development strategy occurred in 1991 because.pdf
 
Incubator operators try to pick those businesses that have the best Fi.pdf
Incubator operators try to pick those businesses that have the best Fi.pdfIncubator operators try to pick those businesses that have the best Fi.pdf
Incubator operators try to pick those businesses that have the best Fi.pdf
 
Indexes and registries allow health information to be maintained and r.pdf
Indexes and registries allow health information to be maintained and r.pdfIndexes and registries allow health information to be maintained and r.pdf
Indexes and registries allow health information to be maintained and r.pdf
 
Incomplete (missing items) vs Delinquent (fallen beyond the record tim.pdf
Incomplete (missing items) vs Delinquent (fallen beyond the record tim.pdfIncomplete (missing items) vs Delinquent (fallen beyond the record tim.pdf
Incomplete (missing items) vs Delinquent (fallen beyond the record tim.pdf
 
Incorporate the SOR method in the multigridTest-m and apply the multig.pdf
Incorporate the SOR method in the multigridTest-m and apply the multig.pdfIncorporate the SOR method in the multigridTest-m and apply the multig.pdf
Incorporate the SOR method in the multigridTest-m and apply the multig.pdf
 
Increasingly consumers are using social media to voice complaints that.pdf
Increasingly consumers are using social media to voice complaints that.pdfIncreasingly consumers are using social media to voice complaints that.pdf
Increasingly consumers are using social media to voice complaints that.pdf
 
income seatement The folowing account balanoes were taken trom the adj.pdf
income seatement The folowing account balanoes were taken trom the adj.pdfincome seatement The folowing account balanoes were taken trom the adj.pdf
income seatement The folowing account balanoes were taken trom the adj.pdf
 
In _________ as the mitotic spindles move to opposite sides of the cel.pdf
In _________ as the mitotic spindles move to opposite sides of the cel.pdfIn _________ as the mitotic spindles move to opposite sides of the cel.pdf
In _________ as the mitotic spindles move to opposite sides of the cel.pdf
 
Inatech is contemplating two different projects and decides to perform.pdf
Inatech is contemplating two different projects and decides to perform.pdfInatech is contemplating two different projects and decides to perform.pdf
Inatech is contemplating two different projects and decides to perform.pdf
 
In which of the following situations is a worker eligible to receive u.pdf
In which of the following situations is a worker eligible to receive u.pdfIn which of the following situations is a worker eligible to receive u.pdf
In which of the following situations is a worker eligible to receive u.pdf
 
In your own words- explain what a lahar is- Question 2 (1 point) Compa.pdf
In your own words- explain what a lahar is- Question 2 (1 point) Compa.pdfIn your own words- explain what a lahar is- Question 2 (1 point) Compa.pdf
In your own words- explain what a lahar is- Question 2 (1 point) Compa.pdf
 
In which of the following situations would we expect to see the highes.pdf
In which of the following situations would we expect to see the highes.pdfIn which of the following situations would we expect to see the highes.pdf
In which of the following situations would we expect to see the highes.pdf
 
In your own words- define promissory estoppel- what elements need to b.pdf
In your own words- define promissory estoppel- what elements need to b.pdfIn your own words- define promissory estoppel- what elements need to b.pdf
In your own words- define promissory estoppel- what elements need to b.pdf
 
In which of the following situations use of oral polio vaccine (OPV) i.pdf
In which of the following situations use of oral polio vaccine (OPV) i.pdfIn which of the following situations use of oral polio vaccine (OPV) i.pdf
In which of the following situations use of oral polio vaccine (OPV) i.pdf
 
In which pH range will bacteria be most likely to grow- a- pH8 to pH12.pdf
In which pH range will bacteria be most likely to grow- a- pH8 to pH12.pdfIn which pH range will bacteria be most likely to grow- a- pH8 to pH12.pdf
In which pH range will bacteria be most likely to grow- a- pH8 to pH12.pdf
 
In what ways can roots take up nutrients- (Select all that apply) Nutr.pdf
In what ways can roots take up nutrients- (Select all that apply) Nutr.pdfIn what ways can roots take up nutrients- (Select all that apply) Nutr.pdf
In what ways can roots take up nutrients- (Select all that apply) Nutr.pdf
 
In what ways can we increase public awareness of our ecological footpr.pdf
In what ways can we increase public awareness of our ecological footpr.pdfIn what ways can we increase public awareness of our ecological footpr.pdf
In what ways can we increase public awareness of our ecological footpr.pdf
 
In Unit 1- we have been learning about business information systems an.pdf
In Unit 1- we have been learning about business information systems an.pdfIn Unit 1- we have been learning about business information systems an.pdf
In Unit 1- we have been learning about business information systems an.pdf
 
In Venezuela- there are a smail number of extremely wealthy households.pdf
In Venezuela- there are a smail number of extremely wealthy households.pdfIn Venezuela- there are a smail number of extremely wealthy households.pdf
In Venezuela- there are a smail number of extremely wealthy households.pdf
 

Recently uploaded

Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
CaitlinCummins3
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
Peter Brusilovsky
 

Recently uploaded (20)

Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdfDiuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
Ernest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell TollsErnest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell Tolls
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Rich Dad Poor Dad ( PDFDrive.com )--.pdf
Rich Dad Poor Dad ( PDFDrive.com )--.pdfRich Dad Poor Dad ( PDFDrive.com )--.pdf
Rich Dad Poor Dad ( PDFDrive.com )--.pdf
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 

in xv6 system i have a program in c that shows process state- but afte.pdf

  • 1. in xv6 system i have a program in c that shows process state, but after i change Makefile, it not working, what i missed? this is the code called pstate.c #include "types.h" #include "stat.h" #include "user.h" int main(void) { struct proc *p; for (p = ptable.proc; p < &ptable.proc[NPROC]; p++) { if (p->state == UNUSED) { continue; } printf("%d %sn", p->pid, states[p->state]); } exit(); } this is the error