<commit_before>// RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library)

// REQUIRES: executable_test
// REQUIRES: concurrency
// REQUIRES: libdispatch

// rdar://76038845
// REQUIRES: concurrency_runtime
// UNSUPPORTED: back_deployment_runtime

import StdlibUnittest
import Darwin
import Dispatch

func loopUntil(priority: TaskPriority) async {
  while (Task.currentPriority != priority) {
    await Task.sleep(1_000_000_000)
  }
}<commit_msg>Only import darwin on platforms which support it. Otherwise fallback to the appropriate C stdlib library<commit_after>// RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library)

// REQUIRES: executable_test
// REQUIRES: concurrency
// REQUIRES: libdispatch

// rdar://76038845
// REQUIRES: concurrency_runtime
// UNSUPPORTED: back_deployment_runtime

import StdlibUnittest
import Dispatch
#if canImport(Darwin)
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif os(WASI)
import WASILibc
#elseif os(Windows)
import CRT
import WinSDK
#endif

func loopUntil(priority: TaskPriority) async {
  while (Task.currentPriority != priority) {
    await Task.sleep(1_000_000_000)
  }
}
{'fraction_non_alphanumeric': 0.10161290322580645, 'fraction_numerical': 0.02903225806451613, 'mean_word_length': 5.143564356435643, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2005166', 'n_tokens_mistral': 442, 'n_tokens_neox': 408, 'n_words': 98}