[info-performer] Multithreading with Performer and Volumizer

Date view Thread view Subject view Author view

From: Bjorn Hanch Sollie (bjorns++at++sgi.com)
Date: 06/11/2003 01:00:35


Hi all,

I'm developing an application framework using multiple threads, which
is to be linked against both the Performer and Volumizer libraries.
(Elements of both is used in the same scene graph.) Performer uses
(data structures only compatible with) sprocs and Volumizer uses
pthreads, and I know that the two are incompatible. What I wasn't
aware of is that they (apparently) can't be linked against the same
program, even though I take great care to use only one of the
threading APIs in, namely sproc. How do I link against both Performer
and Volumizer libraries when I'm using multithreading? Is it
possible? The essence of what I'm trying to do is contained in the
example listed below. I urgently need a way of resolving this issue
in the best possible way and will be grateful for all the help I can
get.

Thanks in advance,

-Beorn

$ cc tstsproc.c -o tstsproc -lvz -lpf
ld32: WARNING 84 : /usr/lib32/libvz.so is not used for resolving any symbol.
ld32: WARNING 84 : /usr/lib32/libpf.so is not used for resolving any symbol.
$ ./tstsproc
Sproc returned -1.
$ cat tstsproc.c
#include <unistd.h>
#include <sys/prctl.h>
#include <sys/ioctl.h>
#include <stdio.h>

void simple_thread(void *thread)
{
  printf("Running thread.\n");
}

int main(int argc, char *argv[])
{
  static pid_t pid;

  pid = sproc(simple_thread, PR_SALL, NULL);
  if (pid == -1)
  {
    printf("Sproc returned -1.\n");
    return 1;
  }

  return 0;
}


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Jun 11 2003 - 00:58:10 PDT