/[LeafOK_CVS]/lbbs/src/trie_dict.c
ViewVC logotype

Diff of /lbbs/src/trie_dict.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.16 by sysadm, Tue Nov 11 00:28:05 2025 UTC Revision 1.17 by sysadm, Mon Nov 17 12:16:48 2025 UTC
# Line 126  int set_trie_dict_shm_readonly(void) Line 126  int set_trie_dict_shm_readonly(void)
126          shmid = p_trie_node_pool->shmid;          shmid = p_trie_node_pool->shmid;
127    
128          // Remap shared memory in read-only mode          // Remap shared memory in read-only mode
129    #if defined(__MSYS__) || defined(__MINGW32__)
130            if (shmdt(p_trie_node_pool) == -1)
131            {
132                    log_error("shmdt(trie_node_pool) error (%d)\n", errno);
133                    return -1;
134            }
135            p_shm = shmat(shmid, p_trie_node_pool, SHM_RDONLY);
136    #else
137          p_shm = shmat(shmid, p_trie_node_pool, SHM_RDONLY | SHM_REMAP);          p_shm = shmat(shmid, p_trie_node_pool, SHM_RDONLY | SHM_REMAP);
138    #endif
139          if (p_shm == (void *)-1)          if (p_shm == (void *)-1)
140          {          {
141                  log_error("shmat(trie_node_pool shmid=%d) error (%d)\n", shmid, errno);                  log_error("shmat(trie_node_pool shmid=%d) error (%d)\n", shmid, errno);


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1