Exemplo n.º 1
0
ARMv7Thread::~ARMv7Thread()
{
	cv.notify_one();
	join();

	close_stack();
	armv7_free_tls(m_id);
}
Exemplo n.º 2
0
// Convert datapool to kml file
int datapool2kml(char *in_file, char *out_file, int listFlag, int stack)
{
  datapool_type_t datapool;
  dbf_header_t *dbf;
  char *header;
  int nCols, nColumns;
  char line[1024];

  // Read configuration file
  read_header_config("DATAPOOL", &dbf, &nCols);

  FILE *ifp = FOPEN(in_file, "r");
  assert(ifp);
  check_datapool_location(ifp, &header, &nColumns);

  FILE *ofp = FOPEN(out_file, "w");
  if (!ofp) {
    printf("Failed to open output file %s: %s\n", out_file, strerror(errno));
    return 0;
  }

  kml_header(ofp);

  int ii = 0;
  while (fgets(line, 1022, ifp) != NULL) {
    strip_end_whitesp(line);

    // now get the individual column values
    datapool_init(&datapool);
    if (read_datapool_line(header, nColumns, line, &datapool)) {
      if (stack) {
	if (ii == 0)
	  open_stack(ofp, &datapool);
	add_to_stack_kml(ofp, &datapool, nCols);
      }
      else
	add_to_kml(ofp, &datapool, dbf, nCols);
      ii++;
    }
  }

  if (stack)
    close_stack(ofp, &datapool);
  kml_footer(ofp);

  fclose(ifp);
  fclose(ofp);

  return 1;
}
Exemplo n.º 3
0
PPUThread::~PPUThread()
{
	if (is_current())
	{
		detach();
	}
	else
	{
		join();
	}

	close_stack();
	ppu_free_tls(m_id);
}
Exemplo n.º 4
0
ARMv7Thread::~ARMv7Thread()
{
    close_stack();
    armv7_free_tls(m_id);
}