Revision: 54909
http://brlcad.svn.sourceforge.net/brlcad/?rev=54909&view=rev
Author: brlcad
Date: 2013-03-27 04:53:03 +0000 (Wed, 27 Mar 2013)
Log Message:
-----------
bu_get_public_cpus() went bye bye
Modified Paths:
--------------
brlcad/trunk/src/libbu/parallel.c
Modified: brlcad/trunk/src/libbu/parallel.c
===================================================================
--- brlcad/trunk/src/libbu/parallel.c 2013-03-27 04:51:50 UTC (rev 54908)
+++ brlcad/trunk/src/libbu/parallel.c 2013-03-27 04:53:03 UTC (rev 54909)
@@ -146,6 +146,16 @@
int
+bu_parallel_id(void)
+{
+ if (cpu)
+ return *(int *)cpu;
+ else
+ return 0;
+}
+
+
+int
bu_is_parallel(void)
{
if (pid_of_initiating_thread != 0)
@@ -331,55 +341,6 @@
}
-int
-bu_get_public_cpus(void)
-{
- int avail_cpus = bu_avail_cpus();
-
-#ifndef _WIN32
-# define PUBLIC_CPUS1 "/var/tmp/public_cpus"
-# define PUBLIC_CPUS2 "/usr/tmp/public_cpus"
-
- int public_cpus = 1;
- FILE *fp;
-
- if ((fp = fopen(PUBLIC_CPUS1, "rb")) != NULL
- || (fp = fopen(PUBLIC_CPUS2, "rb")) != NULL)
- {
- int ret;
- ret = fscanf(fp, "%d", &public_cpus);
- if (ret != 1)
- public_cpus = 1;
- fclose(fp);
- if (public_cpus < 0) public_cpus = avail_cpus + public_cpus;
- if (public_cpus > avail_cpus) public_cpus = avail_cpus;
- return public_cpus;
- }
-
- bu_file_delete(PUBLIC_CPUS1);
- bu_file_delete(PUBLIC_CPUS2);
- if ((fp = fopen(PUBLIC_CPUS1, "wb")) != NULL ||
- (fp = fopen(PUBLIC_CPUS2, "wb")) != NULL)
- {
- fprintf(fp, "%d\n", avail_cpus);
- bu_fchmod(fileno(fp), 0666);
- fclose(fp);
- }
-#endif
- return avail_cpus;
-}
-
-
-int
-bu_parallel_id(void)
-{
- if (cpu)
- return *(int *)cpu;
- else
- return 0;
-}
-
-
/**********************************************************************/
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits