Skip to contentSkip to conversation

Since we have counters in __u64 format we have to print them with %llu macros.

PATCH In review Maxim Uvarov 4 participants 6 messages Sep 26, 2007 – Sep 27, 2007 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Since we have counters in __u64 format we have to print them with %llu macros.

Small fix for documentation.

---

 Documentation/accounting/getdelays.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Documentation/accounting/getdelays.c +1 -1
index cbee3a2..73924df 100644
@@ -208,7 +208,7 @@ void print_delayacct(struct taskstats *t)
 void task_context_switch_counts(struct taskstats *t)
 {
 	printf("\n\nTask   %15s%15s\n"
-	       "       %15lu%15lu\n",
+	       "       %15llu%15llu\n",
 	       "voluntary", "nonvoluntary",
 	       t->nvcsw, t->nivcsw);
 }
Acked-by on v1 1/1
#1 lore raw

Re: [PATCH] Since we have counters in __u64 format we have to print themwith %llu macros.

Quoted 15 lines · Maxim Uvarov

Small fix for documentation.

---

 Documentation/accounting/getdelays.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Documentation/accounting/getdelays.c +0 -0
index cbee3a2..73924df 100644

Documentation/accounting/getdelays.c void print_delayacct(struct taskstats *t) · line 214

Quoted 8 lines
Documentation/accounting/getdelays.c +1 -1
@@ -208,7 +208,7 @@ void print_delayacct(struct taskstats *t)
 void task_context_switch_counts(struct taskstats *t)
 {
 	printf("\n\nTask   %15s%15s\n"
-	       "       %15lu%15lu\n",
+	       "       %15llu%15llu\n",
 	       "voluntary", "nonvoluntary",
 	       t->nvcsw, t->nivcsw);
 }

Looks good!

Signature · 4 lines
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL
#2 lore raw
In reply to Maxim Uvarov

Documentation/accounting/getdelays.c void print_delayacct(struct taskstats *t) · line 213

Quoted 12 lines · Maxim Uvarov
Documentation/accounting/getdelays.c +1 -1
index cbee3a2..73924df 100644
@@ -208,7 +208,7 @@ void print_delayacct(struct taskstats *t)
 void task_context_switch_counts(struct taskstats *t)
 {
 	printf("\n\nTask   %15s%15s\n"
-	       "       %15lu%15lu\n",
+	       "       %15llu%15llu\n",
 	       "voluntary", "nonvoluntary",
 	       t->nvcsw, t->nivcsw);

__u64 is not always long long.

Andreas.

Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
#3 lore raw
Quoted 16 lines · Andreas Schwab

Documentation/accounting/getdelays.c void print_delayacct(struct taskstats *t) · line 213

Quoted 12 lines · Maxim Uvarov
Documentation/accounting/getdelays.c +1 -1
index cbee3a2..73924df 100644
@@ -208,7 +208,7 @@ void print_delayacct(struct taskstats *t)
 void task_context_switch_counts(struct taskstats *t)
 {
 	printf("\n\nTask   %15s%15s\n"
-	       "       %15lu%15lu\n",
+	       "       %15llu%15llu\n",
 	       "voluntary", "nonvoluntary",
 	       t->nvcsw, t->nivcsw);

__u64 is not always long long.

What is the maximum size of long long across all architectures? How does one format __u64 for printing?

Signature · 4 lines
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL
#4 lore raw
Quoted 17 lines · Balbir Singh
Quoted 15 lines · Andreas Schwab

Documentation/accounting/getdelays.c void print_delayacct(struct taskstats *t) · line 213

Quoted 12 lines · Maxim Uvarov
Documentation/accounting/getdelays.c +1 -1
index cbee3a2..73924df 100644
@@ -208,7 +208,7 @@ void print_delayacct(struct taskstats *t)
 void task_context_switch_counts(struct taskstats *t)
 {
 	printf("\n\nTask   %15s%15s\n"
-	       "       %15lu%15lu\n",
+	       "       %15llu%15llu\n",
 	       "voluntary", "nonvoluntary",
 	       t->nvcsw, t->nivcsw);

__u64 is not always long long.

Quoted 3 lines

What is the maximum size of long long across all architectures? How does one format __u64 for printing?

In user space, use the macro PRIu64 (or PRIx64 etc) from <inttypes.h>.

-hpa

#5 lore raw
Quoted 17 lines · H. Peter Anvin
Quoted 16 lines · Balbir Singh
Quoted 15 lines · Andreas Schwab

Documentation/accounting/getdelays.c void print_delayacct(struct taskstats *t) · line 213

Quoted 12 lines · Maxim Uvarov
Documentation/accounting/getdelays.c +1 -1
index cbee3a2..73924df 100644
@@ -208,7 +208,7 @@ void print_delayacct(struct taskstats *t)
 void task_context_switch_counts(struct taskstats *t)
 {
 	printf("\n\nTask   %15s%15s\n"
-	       "       %15lu%15lu\n",
+	       "       %15llu%15llu\n",
 	       "voluntary", "nonvoluntary",
 	       t->nvcsw, t->nivcsw);

__u64 is not always long long.

Quoted 7 lines
Quoted 3 lines

What is the maximum size of long long across all architectures? How does one format __u64 for printing?

In user space, use the macro PRIu64 (or PRIx64 etc) from <inttypes.h>.

-hpa

Thanks, I'll look into it

Signature · 4 lines
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL