Merge branch 'irixxxx'

This commit is contained in:
notaz 2022-09-10 16:57:39 +03:00
commit 7167e5f337
7 changed files with 37 additions and 38 deletions

View file

@ -192,6 +192,10 @@ void *plat_mmap(unsigned long addr, size_t size, int need_exec, int is_fixed)
*/
if (size >= HUGETLB_THRESHOLD)
flags |= MAP_HUGETLB;
#ifdef MAP_JIT
if (need_exec)
flags |= MAP_JIT;
#endif
ret = mmap(req, size, prot, flags, -1, 0);
if (ret == MAP_FAILED && (flags & MAP_HUGETLB)) {
@ -223,8 +227,11 @@ void *plat_mremap(void *ptr, size_t oldsize, size_t newsize)
{
void *ret;
#ifdef MREMAP_MAYMOVE
ret = mremap(ptr, oldsize, newsize, MREMAP_MAYMOVE);
if (ret == MAP_FAILED) {
if (ret == MAP_FAILED)
#endif
{
fprintf(stderr, "mremap %p %zd %zd: ",
ptr, oldsize, newsize);
perror(NULL);

View file

@ -51,7 +51,7 @@ int sndout_alsa_start(int rate_, int stereo)
ret = snd_pcm_hw_params_any(handle, hwparams);
ret |= snd_pcm_hw_params_set_access(handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED);
ret |= snd_pcm_hw_params_set_format(handle, hwparams, SND_PCM_FORMAT_S16_LE);
ret |= snd_pcm_hw_params_set_format(handle, hwparams, SND_PCM_FORMAT_S16);
ret |= snd_pcm_hw_params_set_channels(handle, hwparams, stereo ? 2 : 1);
ret |= snd_pcm_hw_params_set_rate_near(handle, hwparams, &rate, 0);
ret |= snd_pcm_hw_params_set_buffer_size_near(handle, hwparams, &buffer_size);