comp.lang.c
  Home FAQ Contact Sign in
Your Ad Here
comp.lang.c only
 
Advanced search
May 2008
motuwethfrsasuw
   1234 18
567891011 19
12131415161718 20
19202122232425 21
262728293031  22
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.c Profile…
RELATED GROUPS

POPULAR GROUPS

more...


 Up
  multithreading ; linux adn windows behave differently         


Author: kumarchi
Date: May 16, 2008 07:02

hello:

I wrote a simple program which does simple math loop and I am testing
under dual core processor

systm1:
intel dual core laptop ; windows xp os
when I spawn of two threads in windows (both under visual c and cygwin
cc) the program behaves as expected.
in single thread mode the time is 2x and clearly one of hte one do of
the processor is being utilized

system2:
amd 4200x2 desktop ubuntu hardy 8.04
here actually the single thread gets slightly better performance. in
multi thereaded both the cpu's are 100%% utilized. but even in single
threaded both the cpu's are alternatively being used 50/100 %%!!

gurus:
any idea why the linux system (i am assuming the difference is due to
OS) is behaving differently?

here is the simple code
Show full article (2.58Kb)
no comments
  The spinoza papers: towards a theory of progress reporting         


Author: spinoza1111
Date: May 16, 2008 03:45

I want the GUI of the spinoza system to not piss me off with the
usual
type of progress reporting one sees: the flashy, colorful, and
utterly
uninformative gizmos that go back and forth and round and round until
who knows when.

Therefore, the following C Sharp .Net code constitutes a theory of
progress reporting.

I claim that any fixed-count (limit available at run time before the
start) for loop can be monitored by considering it as the attempt to
accomplish a TASK, the accomplishment of which involves only the
processing of zero, one or more ENTITIES with an ENTITY COUNT. The
actual user (the person running the program) needs to see at what
rate
processing runs.

Each time through the loop, we are at a specific ENTITY NUMBER.

Progress and velocity can then be modeled visually by means of a
histogram such that:
Show full article (5.75Kb)
no comments
  The spinoza papers: towards a theory of progress reporting         


Author: spinoza1111
Date: May 16, 2008 03:36

I want the GUI of the spinoza system to not piss me off with the usual
type of progress reporting one sees: the flashy, colorful, and utterly
uninformative gizmos that go back and forth and round and round until
who knows when.

Therefore, the following C Sharp .Net code constitutes a theory of
progress reporting.

I claim that any fixed-count (limit available at run time before the
start) for loop can be monitored by considering it as the attempt to
accomplish a TASK, the accomplishment of which involves only the
processing of zero, one or more ENTITIES with an ENTITY COUNT. The
actual user (the person running the program) needs to see at what rate
processing runs.

Each time through the loop, we are at a specific ENTITY NUMBER.

Progress and velocity can then be modeled visually by means of a
histogram such that:

histogramDimension/maxHistogramDimension = entityNumber/
entityCount

Solving for histogramDimension each time the "progress" handler runs:
Show full article (5.59Kb)
1 Comment
  hot pictures of indian actress, models and fashion shows         


Author: nagma
Date: May 16, 2008 02:06

hot pictures of indian actress, models and fashion shows

http://cutehyderabadbabes.blogspot.com/
no comments
  Embedded Software Dev Position - GoAhead - Interested?         


Author: stephbt
Date: May 15, 2008 15:57

GoAhead. Be Part of A Team, A Vision, A Technology Revolution.

GoAhead Software is changing the face of high availability and system
management for the telecom, military and aerospace industries. As the
acknowledged industry leader in commercial high availability
middleware, we are building upon our successful track record while
maintaining an enviable corporate culture. We boast a tight-knit team
of sharp, creative people who get it done.

We are a private company headquartered in downtown Bellevue,
Washington, a rapidly growing city situated between Lakes Washington
and Sammamish just minutes from downtown Seattle. The views are
picturesque with the snow-capped mountains of the Cascades to the East
and Mount Rainier dominating the horizon to the South. Bellevue is
the metropolitan hub of the Eastside that thrives on innovation and
the entrepreneurial spirit. Come be part of a company on the move!

Currently, GoAhead is seeking a Software Developer to join its
technical team. This position designs, develops, documents, and tests
software for a variety of operating systems. Essential duties include...
Show full article (2.97Kb)
no comments
  credit card         


Author: anjalikut
Date: May 15, 2008 15:18

no comments
  return a==b;         


Author: google.bo
Date: May 15, 2008 15:12

I don't remember the exact syntax, however I've heard that
return a==b;
is valid c (like in gcc does not complain)
my questions:
1) is this real C standard?
2) as there is no true nor false in C (just 0 and not 0) what does
a==b have for a value, if any?
thanx
olivier
15 Comments
  questions on pointers         


Author: JOhn
Date: May 15, 2008 13:52

can someone please post some complicated question on pointers??

moreover while reading pointers I found out that there is a lot of
difference between an arracy of intergers and an array of
characters(string) ............. relating to
pointers ................am i correct................the way pointers
behave when they have a char array as an address and the way they
behave when they have an integer array as an address ????

please help as pointers is haunting me a lot ??? despite of being
quite old to 'C'

please help
2 Comments
  Do you see anything wrong with programme ?         


Author: Spiros Bousbouras
Date: May 15, 2008 07:46

I got the following programme from an old post:
http://tinyurl.com/53oa6o

It was given at a job interview and the question was
"The following program works, but what is a
potential problem with it? "

#include
#include

int main() {
char buf[128];
FILE *fp = fopen(__FILE__, "r");

if (!fp) return EXIT_FAILURE;
while(!feof(fp)) {
if (fgets(buf, sizeof buf, fp))
puts(buf);
}
fclose(fp);
return 0;
}
Show full article (0.86Kb)
6 Comments
Your Ad Here
  sprintf confusion         


Author: arnuld
Date: May 15, 2008 04:37

For my program , I want to convert an integer into array of characters. I
see C has an atoi function o convert from an array of characters to
integers but no standard function to convert from integer to an array opf
chars. Why so ? Does that conversion not come into practice ?

we have sprintf but that riddles with the buffer-overflow problem :( and
snprintf is not in ANSI but in C99.

I have a network program in C ( which is not topical here, hence I did
not post the code). The client sends a number to the server and server
squares the number and sends it back to the client. Now any communication
between them happens using characters. So client sends an array of
characters to the server:

arr[] = { '3', '\0' };

and the server reads and square the number and sends this array back to
the client:

arr_new[] = { '9', '\0' };

Right now I solved the problem using sprintf and by using the number whose
squares are of one digit and I have also limited the size of array to 2
only.

but is this the C way of doing things ?
Show full article (1.17Kb)
4 Comments
1 2 3 4 5 6 7 8 9