Changes in / [d7b7f5e:1c0cef0] in mainline
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified kernel/arch/mips32/include/arch/asm.h ¶
rd7b7f5e r1c0cef0 42 42 NO_TRACE static inline void cpu_sleep(void) 43 43 { 44 /* 45 * Unfortunatelly most of the simulators do not support 46 * 47 * asm volatile ( 48 * "wait" 49 * ); 50 * 51 */ 44 asm volatile ("wait"); 52 45 } 53 46 -
TabularUnified kernel/generic/src/debug/panic.c ¶
rd7b7f5e r1c0cef0 96 96 printf("THE=%p: ", THE); 97 97 if (THE != NULL) { 98 printf("p e=%" PRIun " thr=%p task=%p cpu=%p as=%p"98 printf("pd=%" PRIun " thread=%p task=%p cpu=%p as=%p" 99 99 " magic=%#" PRIx32 "\n", THE->preemption_disabled, 100 100 THE->thread, THE->task, THE->cpu, THE->as, THE->magic); 101 102 if (THE->thread != NULL) 103 printf("thread=\"%s\"\n", THE->thread->name); 104 105 if (THE->task != NULL) 106 printf("task=\"%s\"\n", THE->task->name); 101 107 } else 102 108 printf("invalid\n"); -
TabularUnified kernel/generic/src/mm/frame.c ¶
rd7b7f5e r1c0cef0 443 443 NO_TRACE static void zone_mark_unavailable(zone_t *zone, size_t index) 444 444 { 445 if (!(zone->flags & ZONE_AVAILABLE)) 446 return; 445 ASSERT(zone->flags & ZONE_AVAILABLE); 447 446 448 447 frame_t *frame = zone_get_frame(zone, index); -
TabularUnified uspace/app/netspeed/netspeed.c ¶
rd7b7f5e r1c0cef0 63 63 64 64 int listen_sd = socket(PF_INET, sock_type, 0); 65 if (listen_sd < 0) 65 if (listen_sd < 0) { 66 66 fprintf(stderr, "socket failed: %s\n", str_error(rc)); 67 67 return rc; 68 } 68 69 69 70 rc = bind(listen_sd, (struct sockaddr *) &addr, sizeof(addr)); … … 92 93 return conn_sd; 93 94 } 94 } 95 else { 95 } else { 96 96 conn_sd = listen_sd; 97 97 } … … 150 150 if (sock_type == SOCK_STREAM) { 151 151 rc = send(conn_sd, buf, bufsize, 0); 152 } 153 else { 152 } else { 154 153 rc = sendto(conn_sd, buf, bufsize, 0, 155 154 (struct sockaddr *) &addr, sizeof(addr)); … … 181 180 if (str_cmp(argv[1], "tcp") == 0) { 182 181 sock_type = SOCK_STREAM; 183 } 184 else if (str_cmp(argv[1], "udp") == 0) { 182 } else if (str_cmp(argv[1], "udp") == 0) { 185 183 sock_type = SOCK_DGRAM; 186 } 187 else { 184 } else { 188 185 fprintf(stderr, "Invalid socket type\n"); 189 186 syntax_print(); … … 266 263 if (rc != EOK) 267 264 fprintf(stderr, "Server failed: %s\n", str_error(rc)); 268 } 269 else { 265 } else { 270 266 rc = client(sock_type, address, port, count, buf, bufsize); 271 267 if (rc != EOK) -
TabularUnified uspace/app/wavplay/dplay.c ¶
rd7b7f5e r1c0cef0 151 151 device_event_callback, pb); 152 152 if (ret != EOK) { 153 printf("Failed to register event callback.\n"); 153 printf("Failed to register event callback: %s.\n", 154 str_error(ret)); 154 155 return; 155 156 } … … 285 286 pb->f.sample_format); 286 287 if (ret != EOK) { 287 printf("Failed to start playback\n"); 288 printf("Failed to start playback: %s\n", 289 str_error(ret)); 288 290 return; 289 291 } … … 291 293 ret = audio_pcm_get_buffer_pos(pb->device, &pos); 292 294 if (ret != EOK) { 293 printf("Failed to update position indicator\n"); 295 printf("Failed to update position indicator " 296 "%s\n", str_error(ret)); 294 297 } 295 298 } … … 308 311 const int ret = audio_pcm_get_buffer_pos(pb->device, &pos); 309 312 if (ret != EOK) { 310 printf("Failed to update position indicator\n"); 313 printf("Failed to update position indicator %s\n", 314 str_error(ret)); 311 315 } 312 316 getuptime(&time); … … 350 354 ret = audio_pcm_get_info_str(session, &info); 351 355 if (ret != EOK) { 352 printf("Failed to get PCM info .\n");356 printf("Failed to get PCM info: %s.\n", str_error(ret)); 353 357 goto close_session; 354 358 } -
TabularUnified uspace/app/wavplay/main.c ¶
rd7b7f5e r1c0cef0 79 79 &format.sampling_rate, &format.sample_format, &error); 80 80 if (ret != EOK) { 81 printf("Error parsing wav header: %s.\n", error);81 printf("Error parsing `%s' wav header: %s.\n", filename, error); 82 82 fclose(source); 83 83 return EINVAL; 84 84 } 85 86 printf("File `%s' format: %u channel(s), %uHz, %s.\n", filename, 87 format.channels, format.sampling_rate, 88 pcm_sample_format_str(format.sample_format)); 85 89 86 90 /* Allocate buffer and create new context */ … … 136 140 &format.sampling_rate, &format.sample_format, &error); 137 141 if (ret != EOK) { 138 printf("Error parsing wav header: %s.\n", error);142 printf("Error parsing `%s' wav header: %s.\n", filename, error); 139 143 fclose(source); 140 144 return EINVAL; 141 145 } 146 printf("File `%s' format: %u channel(s), %uHz, %s.\n", filename, 147 format.channels, format.sampling_rate, 148 pcm_sample_format_str(format.sample_format)); 142 149 143 150 /* Connect new playback context */ -
TabularUnified uspace/app/wavplay/wave.c ¶
rd7b7f5e r1c0cef0 81 81 } 82 82 83 if (uint16_t_le2host(header->subchunk1_size) != PCM_SUBCHUNK1_SIZE) { 83 if (uint32_t_le2host(header->subchunk1_size) != PCM_SUBCHUNK1_SIZE) { 84 //TODO subchunk 1 sizes other than 16 are allowed ( 18, 40) 85 //http://www-mmsp.ece.mcgill.ca/documents/AudioFormats/WAVE/WAVE.html 84 86 if (error) 85 87 *error = "invalid subchunk1 size"; 86 return EINVAL;88 // return EINVAL; 87 89 } 88 90 … … 94 96 95 97 if (str_lcmp(header->subchunk2_id, SUBCHUNK2_ID, 4) != 0) { 98 //TODO basedd on subchunk1 size, we might be reading wrong 99 //offset 96 100 if (error) 97 101 *error = "invalid subchunk2 id"; 98 return EINVAL;102 // return EINVAL; 99 103 } 100 104 101 105 106 //TODO data and data_size are incorrect in extended wav formats 107 //pcm params are OK 102 108 if (data) 103 109 *data = header->data; -
TabularUnified uspace/lib/gui/window.c ¶
rd7b7f5e r1c0cef0 66 66 67 67 static pixel_t border_color = PIXEL(255, 0, 0, 0); 68 static pixel_t header_bg_focus_color = PIXEL(255, 25, 25, 112);68 static pixel_t header_bg_focus_color = PIXEL(255, 88, 106, 196); 69 69 static pixel_t header_fg_focus_color = PIXEL(255, 255, 255, 255); 70 static pixel_t header_bg_unfocus_color = PIXEL(255, 70, 130, 180);70 static pixel_t header_bg_unfocus_color = PIXEL(255, 12, 57, 92); 71 71 static pixel_t header_fg_unfocus_color = PIXEL(255, 255, 255, 255); 72 72 -
TabularUnified uspace/srv/audio/hound/audio_device.c ¶
rd7b7f5e r1c0cef0 162 162 } 163 163 audio_pcm_register_event_callback(dev->sess, 164 device_event_callback, dev); \164 device_event_callback, dev); 165 165 166 166 /* Fill the buffer first. Fill the first two fragments, -
TabularUnified uspace/srv/fs/ext4fs/ext4fs_ops.c ¶
rd7b7f5e r1c0cef0 876 876 if (rc != EOK) 877 877 return rc; 878 if (NULL == inst)879 return ENOENT;880 878 881 879 ext4_superblock_t *sb = inst->filesystem->superblock; -
TabularUnified uspace/srv/fs/mfs/mfs.h ¶
rd7b7f5e r1c0cef0 44 44 #include <errno.h> 45 45 #include <assert.h> 46 #include <stdbool.h> 46 47 #include "../../vfs/vfs.h" 47 48 … … 105 106 unsigned isearch; 106 107 unsigned zsearch; 108 109 /* Indicates wether if the cached number of free zones 110 * is to be considered valid or not. 111 */ 112 bool nfree_zones_valid; 113 /* Cached number of free zones, used to avoid to scan 114 * the whole bitmap every time the mfs_free_block_count() 115 * is invoked. 116 */ 117 unsigned nfree_zones; 107 118 }; 108 119 -
TabularUnified uspace/srv/fs/mfs/mfs_balloc.c ¶
rd7b7f5e r1c0cef0 88 88 { 89 89 int r = mfs_alloc_bit(inst, zone, BMAP_ZONE); 90 if (r != EOK) 91 return r; 92 93 /* Update the cached number of free zones */ 94 struct mfs_sb_info *sbi = inst->sbi; 95 if (sbi->nfree_zones_valid) 96 sbi->nfree_zones--; 90 97 91 98 *zone += inst->sbi->firstdatazone - 1; … … 103 110 mfs_free_zone(struct mfs_instance *inst, uint32_t zone) 104 111 { 112 int r; 113 105 114 zone -= inst->sbi->firstdatazone - 1; 106 115 107 return mfs_free_bit(inst, zone, BMAP_ZONE); 116 r = mfs_free_bit(inst, zone, BMAP_ZONE); 117 if (r != EOK) 118 return r; 119 120 /* Update the cached number of free zones */ 121 struct mfs_sb_info *sbi = inst->sbi; 122 if (sbi->nfree_zones_valid) 123 sbi->nfree_zones++; 124 125 return r; 108 126 } 109 127 -
TabularUnified uspace/srv/fs/mfs/mfs_ops.c ¶
rd7b7f5e r1c0cef0 216 216 sbi->isearch = 0; 217 217 sbi->zsearch = 0; 218 sbi->nfree_zones_valid = false; 219 sbi->nfree_zones = 0; 218 220 219 221 if (version == MFS_VERSION_V3) { … … 1181 1183 return rc; 1182 1184 1183 if (NULL == inst) 1184 return ENOENT; 1185 1186 mfs_count_free_zones(inst, &block_free); 1187 *count = block_free; 1188 1189 return EOK; 1185 struct mfs_sb_info *sbi = inst->sbi; 1186 1187 if (!sbi->nfree_zones_valid) { 1188 /* The cached number of free zones is not valid, 1189 * we need to scan the bitmap to retrieve the 1190 * current value. 1191 */ 1192 1193 rc = mfs_count_free_zones(inst, &block_free); 1194 if (rc != EOK) 1195 return rc; 1196 1197 sbi->nfree_zones = block_free; 1198 sbi->nfree_zones_valid = true; 1199 } 1200 1201 *count = sbi->nfree_zones; 1202 1203 return rc; 1190 1204 } 1191 1205 -
TabularUnified uspace/srv/hid/compositor/compositor.c ¶
rd7b7f5e r1c0cef0 2176 2176 2177 2177 /* Color of the viewport background. Must be opaque. */ 2178 bg_color = PIXEL(255, 75, 70, 75);2178 bg_color = PIXEL(255, 69, 51, 103); 2179 2179 2180 2180 /* Register compositor server. */
Note:
See TracChangeset
for help on using the changeset viewer.