struct T
fn9 (struct T x, int y)
{
  struct T t = fn8 (x, y);
  if (fn2 ())
    fn7 (q);
  return t;
}
Beispiel #2
0
void
fn9 (void)
{
  /* This is the old LinuxThreads pthread_cleanup_{push,pop}.  */
     struct _pthread_cleanup_buffer b;
  _pthread_cleanup_push (&b, clh, (void *) 10l);

  fn8 ();

  _pthread_cleanup_pop (&b, 1);
}
Beispiel #3
0
void
foo ()
{
  int i;
  for (i = 1; i <= 50; i++)
    {
      fn6 (i + 0x1234, i + 1, i + 0xa, i + 0x1234, q, b);
      fn5 (i + 0xabcd, i << 1, i + 0x1234, i << 2);
      fn7 (i + 0xdead);
      fn8 (i + 0xdead);
      fn1 (i, i + 1, i + 2, i + 3, i + 4, i + 5, i << 10);
      fn4 (i + 0xfeed, i);
    }
}
Beispiel #4
0
// CHECK-LABEL: @main
int main() {
// CHECK: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num(
// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc({{[^,]+}}, i32 [[GTID]], i32 1, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN7:[^ ]+]] to i32 (i32, i8*)*))
// CHECK: call i32 @__kmpc_omp_task(%{{.+}}* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]])
#pragma omp task if (true)
  fn7();
// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc({{[^,]+}}, i32 [[GTID]], i32 1, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN8:[^ ]+]] to i32 (i32, i8*)*))
// CHECK: [[TASK_PTR:%.+]] = bitcast i8* [[ORIG_TASK_PTR]] to
// CHECK: call void @__kmpc_omp_task_begin_if0(%{{.+}}* @{{.+}}, i{{.+}} [[GTID]], i8* [[ORIG_TASK_PTR]])
// CHECK: call i32 [[CAP_FN8]](i32 [[GTID]], %{{.+}}* [[TASK_PTR]])
// CHECK: call void @__kmpc_omp_task_complete_if0(%{{.+}}* @{{.+}}, i{{.+}} [[GTID]], i8* [[ORIG_TASK_PTR]])
#pragma omp task if (false)
  fn8();

// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc({{[^,]+}}, i32 [[GTID]], i32 1, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN9:[^ ]+]] to i32 (i32, i8*)*))
// CHECK: [[TASK_PTR:%.+]] = bitcast i8* [[ORIG_TASK_PTR]] to
// CHECK: br i1 %{{.+}}, label %[[OMP_THEN:.+]], label %[[OMP_ELSE:.+]]
// CHECK: [[OMP_THEN]]
// CHECK: call i32 @__kmpc_omp_task(%{{.+}}* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]])
// CHECK: br label %[[OMP_END:.+]]
// CHECK: [[OMP_ELSE]]
// CHECK: call void @__kmpc_omp_task_begin_if0(%{{.+}}* @{{.+}}, i{{.+}} [[GTID]], i8* [[ORIG_TASK_PTR]])
// CHECK: call i32 [[CAP_FN9]](i32 [[GTID]], %{{.+}}* [[TASK_PTR]])
// CHECK: call void @__kmpc_omp_task_complete_if0(%{{.+}}* @{{.+}}, i{{.+}} [[GTID]], i8* [[ORIG_TASK_PTR]])
// CHECK: br label %[[OMP_END]]
// CHECK: [[OMP_END]]
#pragma omp task if (Arg)
  fn9();
// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc({{[^,]+}}, i32 [[GTID]], i32 1, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN10:[^ ]+]] to i32 (i32, i8*)*))
// CHECK: [[TASK_PTR:%.+]] = bitcast i8* [[ORIG_TASK_PTR]] to
// CHECK: br i1 %{{.+}}, label %[[OMP_THEN:.+]], label %[[OMP_ELSE:.+]]
// CHECK: [[OMP_THEN]]
// CHECK: call i32 @__kmpc_omp_task_with_deps(%{{.+}}* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]], i32 1, i8* [[LIST:%[^,]+]], i32 0, i8* null)
// CHECK: br label %[[OMP_END:.+]]
// CHECK: [[OMP_ELSE]]
// CHECK: call void @__kmpc_omp_wait_deps(%{{.+}}* @{{.+}}, i32 [[GTID]], i32 1, i8* [[LIST]], i32 0, i8* null)
// CHECK: call void @__kmpc_omp_task_begin_if0(%{{.+}}* @{{.+}}, i{{.+}} [[GTID]], i8* [[ORIG_TASK_PTR]])
// CHECK: call i32 [[CAP_FN10]](i32 [[GTID]], %{{.+}}* [[TASK_PTR]])
// CHECK: call void @__kmpc_omp_task_complete_if0(%{{.+}}* @{{.+}}, i{{.+}} [[GTID]], i8* [[ORIG_TASK_PTR]])
// CHECK: br label %[[OMP_END]]
// CHECK: [[OMP_END]]
#pragma omp task if (Arg) depend(inout : Arg)
  fn10();
  // CHECK: = call {{.*}}i{{.+}} @{{.+}}tmain
  return tmain(Arg);
}
Beispiel #5
0
TInt DWinsMMCStack::CreateBinFileForCard(TInt aCardNum,HANDLE* aHandle,TBool aCreateNew)
//
// create .bin file in temp directory to contain media area of card.
//
	{
	const char* emulatorPath = Property::GetString("EmulatorMediaPath");
	if (!Emulator::CreateAllDirectories(emulatorPath))
		return Emulator::LastError();

	TBuf8<KMaxFileName> fn8(_L8(emulatorPath));
	fn8.Append(_L8("MMCCRD"));
	fn8.AppendNum(aCardNum);
	fn8.Append(_L8("A.BIN"));
	fn8.Append('\0');
	*aHandle = CreateFileA(
		(LPCSTR) fn8.Ptr(),							// LPCSTR lpFileName,
		GENERIC_READ | GENERIC_WRITE,				// DWORD dwDesiredAccess
		FILE_SHARE_READ | FILE_SHARE_WRITE,			// DWORD dwShareMode
		NULL,										// LPSECURITY_ATTRIBUTES lpSecurityAttributes
		aCreateNew ? CREATE_ALWAYS : OPEN_ALWAYS,	// DWORD dwCreationDisposition
		FILE_FLAG_RANDOM_ACCESS,					// DWORD dwFlagsAndAttributes
			NULL);									// HANDLE hTemplateFile
	
	TInt fileSize = 0;
	if (*aHandle!=INVALID_HANDLE_VALUE)
	    {
        fileSize = GetFileSize(*aHandle,NULL);
        // Check whether MMC card force mount property is set.
        // Force mount MMC card image regardless of whether the size of the image file is
        // as specified in the epoc.ini.
        // Specify "MMCCardForceMount 1" in the epoc.ini to enable force mount.
        TBool forceMount = Property::GetBool("MMCCardForceMount");
        if (forceMount && fileSize != INVALID_FILE_SIZE)
            {
            TInt sizeInKB = fileSize >> 10;
            SetupDiskParms(sizeInKB);
            TotalMDiskSize = fileSize;
            }